code: def generate_random_token():
      k = len(string.ascii_letters)
      tokens = list(np.arange(k, dtype=int))
      tokens += list(np.arange(k, dtype=float))
      tokens += list(string.ascii_letters)
      tokens += [None for i in range(k)]
      tokens = np.array(tokens, dtype=object)
      rng = np.random.RandomState(seed=0)
  
      while 1:
          size = rng.randint(1, 3)
          element = rng.choice(tokens, size)
          if size == 1:
              yield element[0]
          else:
              yield tuple(element)
  
file_path: catboost/contrib/python/scipy/py3/scipy/cluster/tests/test_disjoint_set.py
imports: import pytest
  from pytest import raises
  import numpy
  from scipy.cluster.hierarchy import DisjointSet
  import string
label_desc: Use image node_id 1 for calling a global function with example usage: generate_random_token() without return types