code: def to_one_hot(i, n_classes=None):
      a = np.zeros(n_classes, "uint8")
      a[i] = 1
      return a
  
file_path: TensorLayer/examples/reinforcement_learning/tutorial_DQN.py
imports: import argparse
  import os
  import time
  import gym
  import matplotlib.pyplot
  import numpy
  import tensorflow
  import tensorlayer
label_desc: Use image node_id 1 for calling a global function with example usage: to_one_hot(i, n_classes) and returns: a