code: def get_pairs(word):
      """
      Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length
      strings).
      """
      pairs = set()
      prev_char = word[0]
      for char in word[1:]:
          pairs.add((prev_char, char))
          prev_char = char
      return pairs
  
imports: import json
  from functools import lru_cache
  from typing import Dict, List, Optional, Tuple, Union
  from tokenizers import pre_tokenizers, processors
  from ...file_utils import PaddingStrategy, TensorType, add_end_docstrings
  from ...tokenization_utils_base import ENCODE_KWARGS_DOCSTRING, BatchEncoding, EncodedInput, PreTokenizedInput, TextInput, TextInputPair, TruncationStrategy
  from ...tokenization_utils_fast import PreTrainedTokenizerFast
  from ...utils import logging
  from .tokenization_markuplm import MARKUPLM_ENCODE_PLUS_ADDITIONAL_KWARGS_DOCSTRING, MarkupLMTokenizer
label_desc: Use image node_id 2 for calling a global function with example usage: get_pairs(word) and returns: pairs