code: def open(cls, fp):
          
          if hasattr(fp, 'read'):
              self = cls(PSD.read(fp))
          else:
              with open(fp, 'rb') as f:
                  self = cls(PSD.read(f))
          return self
docs: Open a PSD document.
  
          :param fp: filename or file-like object.
          :return: A :py:class:`~psd_tools.api.psd_image.PSDImage` object.