code: def as_flow(cls, obj):
          
          if isinstance(obj, cls): return obj
          if is_string(obj):
              return cls.pickle_load(obj)
          elif isinstance(obj, collections.Mapping):
              return cls.from_dict(obj)
          else:
              raise TypeError("Don't know how to convert type %s into a Flow" % type(obj))
docs: Convert obj into a Flow. Accepts filepath, dict, or Flow object.