input: Write a Python function to extract and print metadata from a PDF file using the `cmupdf` library.
  ```python
  def extract_pdf_metadata(filename):
      ctx = cmupdf.fz_new_context(None, None, cmupdf.FZ_STORE_UNLIMITED)
      doc = cmupdf.fz_open_document(ctx, filename)
      metadata = {}
      for key in ('Title', 'Subject', 'Author', 'Creator', 'Producer', 'CreationDate', 'ModDate'):
          metadata[key] = cmupdf.get_meta_info(doc, key, 1024)
      cmupdf.fz_free_context(ctx)
      return metadata
  
  assert extract_pdf_metadata("example.pdf") == {"Title": "Example Title", "Subject": "Example Subject", "Author": "Author Name", "Creator": "Creator Name", "Producer": "Producer Name", "CreationDate": "D:20220101000000", "ModDate": "D:20220102000000"}
  assert extract_pdf_metadata("sample.pdf") == {"Title": "Sample Title", "Subject": "Sample Subject", "Author": "Sample Author", "Creator": "Sample Creator", "Producer": "Sample Producer", "CreationDate": "D:20220103000000", "ModDate": "D:20220104000000"}
output: def extract_pdf_metadata(filename):
      import cmupdf
      ctx = cmupdf.fz_new_context(None, None, cmupdf.FZ_STORE_UNLIMITED)
      doc = cmupdf.fz_open_document(ctx, filename)
      metadata = {}
      for key in ('Title', 'Subject', 'Author', 'Creator', 'Producer', 'CreationDate', 'ModDate'):
          metadata[key] = cmupdf.get_meta_info(doc, key, 1024)
      cmupdf.fz_free_context(ctx)
      return metadata