How to create open cavity module

Hi,I am new to fenics,and I want to creat mesh with some simple modules,such as open cavity,so how can I create mesh and define boundaries. Thanks

I suggest you read the tutorials to get started:
https://fenicsproject.org/tutorial/