code: def new_token(token_prefix, prev_token=None):
      if prev_token is None:
          for token in _token_generator(token_prefix):
              return token
      else:
          it = dropwhile(
              lambda x: x != prev_token, _token_generator(token_prefix)
          )
          for _ in it:
              return next(it)
          else:
              return None
  
file_path: metaflow/metaflow/plugins/aws/step_functions/production_token.py
imports: import os
  import json
  import random
  import string
  import zlib
  from itertools import dropwhile, islice
  from metaflow.util import to_bytes
label_desc: Use image node_id 5 for calling a global function with example usage: new_token(token_prefix, prev_token) and returns: token, next, None