code: def __get_display_label_from_internal_label(
      self,
      label: str,
      level: Optional[int],
      pattern_names: Dict[str, str],
  ) -> Optional[str]:
      while label not in pattern_names and label:
          label = label[:-1]
      if label:
          if level is not None:
              matches = [x for x in re.finditer(r"\d", label)]
              if len(matches) > level:
                  label = label[: matches[level].span()[0]]
                  while label not in pattern_names and label:
                      label = label[:-1]
          return pattern_names[label]
  
file_path: scattertext/scattertext/features/usas_offset_getter.py
imports: import gzip
  import json
  import re
  import pkgutil
  import warnings
  from typing import Optional, List, Dict, Callable
  import spacy
  from spacy.strings import StringStore
  from scattertext.features.featoffsets.feat_and_offset_getter import FeatAndOffsetGetter
label_desc: Use image node_id 2 for calling the USASOffsetGetter obj's underlying member method code with example usage: obj.__get_display_label_from_internal_label(label, level, pattern_names) and returns: pattern_names