code: def add_mimetype(mimedb, mimetype, extension):
      
      # If extension is already a common type, strict=True must be used.
      strict = extension in mimedb.types_map[True]
      mimedb.add_type(mimetype, extension, strict=strict)
docs: Add or replace a mimetype to be used with the given extension.