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