code: def _process_output_source_directive(schema, current_schema_type, ast,
                                       location, context, local_unique_directives):
      
      # The 'ast' variable is only for function signature uniformity, and is currently not used.
      output_source_directive = local_unique_directives.get('output_source', None)
      if output_source_directive:
          if has_encountered_output_source(context):
              raise GraphQLCompilationError(u'Cannot have more than one output source!')
          if is_in_optional_scope(context):
              raise GraphQLCompilationError(u'Cannot have the output source in an optional block!')
          set_output_source_data(context, location)
          return blocks.OutputSource()
      else:
          return None
docs: Process the output_source directive, modifying the context as appropriate.
  
      Args:
          schema: GraphQL schema object, obtained from the graphql library
          current_schema_type: GraphQLType, the schema type at the current location
          ast: GraphQL AST node, obtained from the graphql library
          location: Location object representing the current location in the query
          context: dict, various per-compilation data (e.g. declared tags, whether the current block
                   is optional, etc.). May be mutated in-place in this function!
          local_unique_directives: dict, directive name string -> directive object, containing
                                   unique directives present on the current AST node *only*
  
      Returns:
          an OutputSource block, if one should be emitted, or None otherwise