Convert obj into a Flow. Accepts filepath, dict, or Flow object.

def as_flow(cls, obj):
        """Convert obj into a Flow. Accepts filepath, dict, or Flow object."""
        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))