Our indentation style guide (https://edx-wiki.atlassian.net/wiki/display/ENG/Python+Guidelines) suggest:

    response_data.append({
        "id": group.group_id,
        "relationship_type": RELATIONSHIP_TYPES['hierarchical'],
        "uri": '{}/{}'.format(base_uri, group.group.id)
    })