code: def from_extension(extension):
      
      if not extension.startswith('.'):
          raise ValueError("Extensions must begin with a period.")
      try:
          return EXTENSION_TO_TYPE[extension.lower()]
      except KeyError:
          raise UnknownExtensionError(
              "seqmagick does not know how to handle " +
              "files with extensions like this: " + extension)
docs: Look up the BioPython file type corresponding with input extension.
  
      Look up is case insensitive.