code: def asxc(cls, obj):
          
          if isinstance(obj, cls): return obj
          if is_string(obj): return cls.from_name(obj)
          raise TypeError("Don't know how to convert <%s:%s> to Xcfunc" % (type(obj), str(obj)))
docs: Convert object into Xcfunc.