code: def attr_list(args):
      '''Retrieve names of all attributes attached to a given object, either
         an entity (if entity type+name is provided) or workspace (if not)'''
      args.attributes = None
      result = attr_get(args)
      names = result.get("__header__",[])
      if names:
          names = names[1:]
      else:
          names = result.keys()
      return sorted(namesf attr_list(args):
      '''Retrieve names of all attributes attached to a given object, either
         an entity (if entity type+name is provided) or workspace (if not)'''
      args.attributes = None
      result = attr_get(args)
      names = result.get("__header__",[])
      if names:
          names = names[1:]
      else:
          names = result.keys()
      return sorted(names)
docs: Retrieve names of all attributes attached to a given object, either
         an entity (if entity type+name is provided) or workspace (if not)