code: def get_metadata_offsets(self, inputdoc: spacy.tokens.doc.Doc):
      newdoc = self.nlp(str(inputdoc))
      offset_tokens = {}
      for ent in newdoc.ents:
          token_stats = offset_tokens.setdefault(ent.label_, [0, []])
          token_stats[0] += 1
          start = ent[0].idx
          end = start + len(str(ent))
          token_stats[1].append((start, end))
      return list(offset_tokens.items())
  
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 6 for calling the USASOffsetGetter obj's underlying member method code with example usage: obj.get_metadata_offsets(inputdoc) and returns: list