code: def _check_is_max_context(doc_spans, cur_span_index, position):
      best_score, best_span_index = None, None
      for di, (doc_start, doc_length) in enumerate(doc_spans):
          end = doc_start + doc_length - 1
          if position < doc_start:
              continue
          if position > end:
              continue
          num_left_context = position - doc_start
          num_right_context = end - position
          score = (
              min(num_left_context, num_right_context)
              + 0.01 * doc_length
          )
          if best_score is None or score > best_score:
              best_score = score
              best_span_index = di
      return cur_span_index == best_span_index
  
file_path: tinygrad/extra/datasets/squad.py
imports: import json
  import os
  from pathlib import Path
  from transformers import BertTokenizer
  import numpy
  from tinygrad.helpers import fetch
label_desc: Use image node_id 2 for calling a global function with example usage: _check_is_max_context(doc_spans, cur_span_index, position) and returns: unknown