code: def as_pseudo(cls, obj):
          
          return obj if isinstance(obj, cls) else cls.from_file(obj)
docs: Convert obj into a pseudo. Accepts:
  
              * Pseudo object.
              * string defining a valid path.