code: def from_file(cls, f, fname=None, readers=None):
          
          if isinstance(f, six.string_types):
              f = io.open(f, 'rb')
          if not fname and hasattr(f, 'name'):
              fname = f.name
          return cls.from_string(f.read(), fname=fname, readers=readers)
docs: Create a Document from a file.
  
          Usage::
  
              with open('paper.html', 'rb') as f:
                  doc = Document.from_file(f)
  
          .. note::
  
              Always open files in binary mode by using the 'rb' parameter.
  
          :param file|string f: A file-like object or path to a file.
          :param string fname: (Optional) The filename. Used to help determine file format.
          :param list[chemdataextractor.reader.base.BaseReader] readers: (Optional) List of readers to use.