code: def set_export(args):
      '''Return a list of lines in TSV form that would suffice to reconstitute a
         container (set) entity, if passed to entity_import.  The first line in
         the list is the header, and subsequent lines are the container members.
      '''
  
      r = fapi.get_entity(args.project, args.workspace, args.entity_type, args.entity)
      fapi._check_response_code(r, 200)
      set_type = args.entity_type
      set_name = args.entity
      member_type = set_type.split('_')[0]
      members = r.json()['attributes'][member_type+'s']['items']
  
      result = ["membership:{}_id\t{}_id".format(set_type, member_type)]
      result += ["%s\t%s" % (set_name, m['entityName']) for m in members ]
      return resulf set_export(args):
      '''Return a list of lines in TSV form that would suffice to reconstitute a
         container (set) entity, if passed to entity_import.  The first line in
         the list is the header, and subsequent lines are the container members.
      '''
  
      r = fapi.get_entity(args.project, args.workspace, args.entity_type, args.entity)
      fapi._check_response_code(r, 200)
      set_type = args.entity_type
      set_name = args.entity
      member_type = set_type.split('_')[0]
      members = r.json()['attributes'][member_type+'s']['items']
  
      result = ["membership:{}_id\t{}_id".format(set_type, member_type)]
      result += ["%s\t%s" % (set_name, m['entityName']) for m in members ]
      return result
docs: Return a list of lines in TSV form that would suffice to reconstitute a
         container (set) entity, if passed to entity_import.  The first line in
         the list is the header, and subsequent lines are the container members.