<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def build_request_relationship(type, ids):
 """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. """

    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]
        }