@fiss_cmd<EOL>def attr_get(args):
if args.entity_type and args.entity:<EOL><INDENT>r = fapi.get_entity(args.project, args.workspace, args.entity_type, args.entity)<EOL>fapi._check_response_code(r, <NUM_LIT:200>)<EOL>attrs = r.json()['<STR_LIT>']<EOL>for k in ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]:<EOL><INDENT>attrs.pop(k, None)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>r = fapi.get_workspace(args.project, args.workspace)<EOL>fapi._check_response_code(r, <NUM_LIT:200>)<EOL>attrs = r.json()['<STR_LIT>']['<STR_LIT>']<EOL><DEDENT>if args.attributes:         <EOL><INDENT>attrs = {k:attrs[k] for k in set(attrs).intersection(args.attributes)}<EOL><DEDENT>if attrs:<EOL><INDENT>if args.entity:                     <EOL><INDENT>def textify(thing):<EOL><INDENT>if isinstance(thing, dict):<EOL><INDENT>thing = thing.get("<STR_LIT>", thing.get("<STR_LIT>", "<STR_LIT>"))<EOL><DEDENT>return "<STR_LIT>".format(thing)<EOL><DEDENT>result = {args.entity : u'<STR_LIT:\t>'.join(map(textify, attrs.values()))}<EOL>object_id = u'<STR_LIT>' % args.entity_type<EOL>result['<STR_LIT>'] = [object_id] + list(attrs.keys())<EOL><DEDENT>else:<EOL><INDENT>result = attrs                  <EOL><DEDENT><DEDENT>else:<EOL><INDENT>result = {}<EOL><DEDENT>return result<EOL>
Return a dict of attribute name/value pairs: if entity name & type
    are specified then attributes will be retrieved from that entity,
    otherwise workspace-level attributes will be returned.  By default all
    attributes attached to the given object will be returned, but a subset
    can be selected by specifying a list of attribute names; names which
    refer to a non-existent attribute will be silently ignored. By default
    a special __header__ entry is optionally added to the result.