def METHOD_NAME(obj):
  if isinstance(obj, str):
    return obj
  name = getattr(obj, 'name', None)
  if not name:
    raise Exception("{} has no attribute name, please check!".format(obj))
  return name.split(':')[0]