def METHOD_NAME(api_details, p_id, position):
    """Add a role-policy relationship and update the relationships reference list.
    Parameters
    ----------
    p_id : int
        Policy ID.
    position : int
        Relationship position.
    """
    response = requests.post(f"{api_details['base_url']}/security/roles/{role_id}/policies?policy_ids={p_id}"
                             f"&position={position}", headers=api_details['auth_headers'], verify=False)
    assert response.status_code == 200, f'Expected status code was 200. Full response: {response.text}'
    policy_positions.insert(position, p_id)
    assert get_security_resource_information(role_ids=role_id)['policies'] == policy_positions, 'Positions do not match'