code: def get_source(fileobj):
      
      if not isinstance(fileobj, dict):
          return fileobj
      else:
          try:
              with io.open(fileobj["filename"], encoding="utf-8",
                           errors="ignore") as f:
                  return f.read()
          finally:
              if fileobj.get('delete_after_use'):
                  try:
                      os.remove(fileobj["filename"])
                  except:  # pragma: no cover
                      pass
docs: Translate fileobj into file contents.
  
      fileobj is either a string or a dict. If it's a string, that's the
      file contents. If it's a string, then the filename key contains
      the name of the file whose contents we are to use.
  
      If the dict contains a true value for the key delete_after_use,
      the file should be deleted once read.