code: def read(cls, source):
          
          if hasattr(source, "read"):
              return cls.fromfile(source)
          if os.path.exists(source):
              return cls.fromfile(source)
          if isinstance(source, six.string_types):
              source = source.encode("utf8")
          return cls.fromstring(source)
docs: Read ``source`` into a ``METSDocument`` instance. This is an
          instance constructor. The ``source`` may be a path to a METS file, a
          file-like object, or a string of XML.