class_docstr: MIME-types datastore.
  
  This datastore can handle information from mime.types-style files
  and supports basic determination of MIME type from a filename or
  URL, and can guess a reasonable extension given a MIME type.
docstr: Add a mapping between a type and an extension.
  
  When the extension is already known, the new
  type will replace the old one. When the type
  is already known the extension will be added
  to the list of known extensions.
  
  If strict is true, information will be added to
  list of standard types, else to the list of non-standard
  types.
docstr_tok: ["Add","a","mapping","between","a","type","and","an","extension",".","When","the","extension","is","already","known",",","the","new","type","will","replace","the","old","one",".","When","the","type","is","already","known","the","extension","will","be","added","to","the","list","of","known","extensions",".","If","strict","is","true",",","information","will","be","added","to","list","of","standard","types",",","else","to","the","list","of","non-standard","types","."]
code: def add_type(self, type, ext, strict=True):
      """Add a mapping between a type and an extension.
  
      When the extension is already known, the new
      type will replace the old one. When the type
      is already known the extension will be added
      to the list of known extensions.
  
      If strict is true, information will be added to
      list of standard types, else to the list of non-standard
      types.
      """
      self.types_map[strict][ext] = type
      exts = self.types_map_inv[strict].setdefault(type, [])
      if ext not in exts:
          exts.append(ext)
  
imports: import os
  import sys
  import posixpath
  import urllib.parse
label_desc: Use image node_id 2 for calling the MimeTypes obj's underlying member method code with example usage: obj.add_type(type, ext, strict) without return types