docs: def backend_from_fname(name):
      """Determine backend module object from a file name."""
      ext = splitext(name)[1]
  
      try:
          mime = EXTS_TO_MIMETYPES[ext]
  
      except KeyError:
          try:
              f = open(name, 'rb')
  
          except IOError as e:
              # The file may not exist, we are being asked to determine it's type
              # from it's name. Other errors are unexpected.
              if e.errno != errno.ENOENT:
                  raise
  
              # We will have to fall back upon the default backend.
              msg = "No handler for %r, defaulting to %r" % (ext, DEFAULT_MIME)
              if 'FULLTEXT_TESTING' in os.environ:
                  warn(msg)
              else:
                  LOGGER.debug(msg)
  
              mod_name = MIMETYPE_TO_BACKENDS[DEFAULT_MIME]
  
          else:
              with f:
                  return backend_from_fobj(f)
  
      else:
          mod_name = MIMETYPE_TO_BACKENDS[mime]
  
      mod = import_mod(mod_name)
      return mod