code: def relation_for_unit(unit=None, rid=None):
      
      unit = unit or remote_unit()
      relation = relation_get(unit=unit, rid=rid)
      for key in relation:
          if key.endswith('-list'):
              relation[key] = relation[key].split()
      relation['__unit__'] = unit
      return relation
docs: Get the json represenation of a unit's relation