def is_specified_directive(directive: GraphQLDirective):
    """Check whether the given directive is one of the specified directives."""
    return isinstance(directive, GraphQLDirective) and any(
        specified_directive.name == directive.name
        for specified_directive in specified_directives
    )
Check whether the given directive is one of the specified directives.