code: def _check_is_max_context(doc_spans, cur_span_index, position):
      """Check if this is the 'max context' doc span for the token.
      Because of the sliding window approach taken to scoring documents,
      a single token can appear in multiple documents.
      Example:
          Doc: the man went to the store and bought a gallon of milk
          Span A: the man went to the
          Span B: to the store and bought
          Span C: and bought a gallon of
          ...
      Now the word 'bought' will have two scores from spans B and C. We only
      want to consider the score with "maximum context", which we define as
      the *minimum* of its left and right context (the *sum* of left and
      right context will always be the same, of course).
      In the example the maximum context for 'bought' would be span C since
      it has 1 left context and 3 right context, while span B has 4 left context
      and 0 right context.
      Code adapted from the code by the Google AI and HuggingFace.
      """
      best_span_index = get_best_span_index(doc_spans, position)
      return cur_span_index == best_span_index
  
imports: import collections
  import os
  import pickle
  from functools import lru_cache
  from typing import Dict, List, Optional
  import numpy
  import psutil
  import torch
  from tqdm import trange
  from nemo.collections.common.parts.utils import _compute_softmax
  from nemo.collections.nlp.data.data_utils import is_whitespace
  from nemo.collections.nlp.data.question_answering_squad.qa_squad_processing import EVALUATION_MODE, INFERENCE_MODE, TRAINING_MODE, SquadProcessor, _improve_answer_span, apply_no_ans_threshold, exact_match_score, f1_score, find_all_best_thresh, get_best_indexes, get_final_text, make_eval_dict, merge_eval, normalize_answer
  from nemo.core.classes import Dataset
  from nemo.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: _check_is_max_context(doc_spans, cur_span_index, position) and returns: unknown