code: def get_metadata_offsets(
      self, doc
  ) -> List[Tuple[str, List[Tuple[int, List[Tuple[int, int]]]]]]:
      offset_tokens = self._doc_to_feature_representation(doc)
      return list(offset_tokens.items())
  
imports: from typing import List, Tuple, Union, Optional, Callable, Dict
  from collections import deque
  from scattertext.features.FeatsFromSpacyDoc import FeatsFromSpacyDoc
  from scattertext.features.featoffsets.feat_and_offset_getter import FeatAndOffsetGetter
  from scattertext.Common import MY_ENGLISH_STOP_WORDS
label_desc: Use image node_id 2 for calling the FlexibleNGramFeatures obj's underlying member method code with example usage: obj.get_metadata_offsets(doc) and returns: list