<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_operator_name(operator, supported_operators):
 """Ensure the named operator is valid and supported."""

    if not isinstance(operator, six.text_type):
        raise TypeError(u'Expected operator as unicode string, got: {} {}'.format(
            type(operator).__name__, operator))

    if operator not in supported_operators:
        raise GraphQLCompilationError(u'Unrecognized operator: {}'.format(operator))