code: def build_request_relationship(type, ids):
      
      if ids is None:
          return {
              'data': None
          }
      elif isinstance(ids, str):
          return {
              'data': {'id': ids, 'type': type}
          }
      else:
          return {
              "data": [{"id": id, "type": type} for id in ids]
          }
docs: Build a relationship list.
  
      A relationship list is used to update relationships between two
      resources. Setting sensors on a label, for example, uses this
      function to construct the list of sensor ids to pass to the Helium
      API.
  
      Args:
  
          type(string): The resource type for the ids in the relationship
          ids([uuid] or uuid): Just one or a list of resource uuids to use
              in the relationship
  
      Returns:
  
          A ready to use relationship JSON object.