<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _validate_no_rels(param, rels):
 """ Ensure the sortable field is not on a relationship """


    if param.field in rels:
        raise InvalidQueryParams(**{
            'detail': 'The sort query param value of "%s" is not '
                      'supported. Sorting on relationships is not '
                      'currently supported' % param.raw_field,
            'links': LINK,
            'parameter': PARAM,
        })