code: def get_all_ngrams(tokens):
      from snips_nlu_utils import compute_all_ngrams
  
      if not tokens:
          return []
      key = "<||>".join(tokens)
      if key not in _NGRAMS_CACHE:
          ngrams = compute_all_ngrams(tokens, len(tokens))
          _NGRAMS_CACHE[key] = ngrams
      return deepcopy(_NGRAMS_CACHE[key])
  
imports: from __future__ import unicode_literals
  from copy import deepcopy
  from snips_nlu.common.dict_utils import LimitedSizeDict
  from snips_nlu.constants import END, RES_MATCH_RANGE, START
label_desc: Use image node_id 1 for calling a global function with example usage: get_all_ngrams(tokens) and returns: deepcopy, list