How to generate the content of “module @patterns” and "module @ir " in "mlir/test/Rewrite/pdl-bytecode.mlir" file?

I want to generate a similar additional test demo ,like the file “llvm-project/mlir/test/Rewrite/pdl-bytecode.mlir”. But i donot know how to generate it. thanks!