code: def __init__(
      self,
      ngram_sizes: Optional[List[int]] = None,
      exclude_ngram_filter: Optional[Callable] = None,
      text_from_token: Optional[Callable] = None,
      validate_token: Optional[Callable] = lambda x: x.orth_.strip()
      != "",
  ):
      FeatsFromSpacyDoc.__init__(self)
      FlexibleNGramFeaturesBase.__init__(
          self,
          exclude_ngram_filter,
          ngram_sizes,
          text_from_token,
          validate_token,
      )
  
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 1 to create a new FlexibleNGrams object from inherited base classes: FeatsFromSpacyDoc, FlexibleNGramFeaturesBase with example: obj = FlexibleNGrams(ngram_sizes, exclude_ngram_filter, text_from_token, validate_token)