code: def generate_sequence_data(
      batch_size, seq_len, feature_size, input_as_index=False
  ):
      assert batch_size == 1
      np.random.seed(0)
      data = (
          np.zeros((batch_size, seq_len)).astype(np.float32)
          if input_as_index
          else np.zeros((batch_size, seq_len, feature_size)).astype(
              np.float32
          )
      )
      for i in range(0, seq_len):
          one_hot_index = np.random.random_integers(0, feature_size - 1)
          if input_as_index:
              data[0][i] = one_hot_index
          else:
              data[0][i][one_hot_index] = 1
      return data
  
file_path: CNTK/bindings/python/cntk/tests/onnx_verify_helper.py
imports: from __future__ import print_function
  import os, re, sys, subprocess, scipy, pytest, numpy
  import cntk
label_desc: Use image node_id 6 for calling a global function with example usage: generate_sequence_data(batch_size, seq_len, feature_size, input_as_index) and returns: data