code: def observation_placeholder(ob_space, batch_size=None, name="Ob"):
      """
      Create placeholder to feed observations into of the size appropriate to the observation space
  
      Parameters
      ----------
      ob_space : gym.Space
          observation space
      batch_size : int
          size of the batch to be fed into input. Can be left None in most cases.
      name : str
          name of the placeholder
  
      Returns
      -------
      tensorflow placeholder tensor
      """
  
      assert isinstance(
          ob_space, (Discrete, Box, MultiDiscrete)
      ), "Can only deal with Discrete and Box observation spaces for now"
  
      dtype = ob_space.dtype
      if dtype == np.int8:
          dtype = np.uint8
  
      return tf.placeholder(
          shape=(batch_size,) + ob_space.shape, dtype=dtype, name=name
      )
  
file_path: nni/nni/algorithms/hpo/ppo_tuner/util.py
imports: import os
  import random
  import multiprocessing
  import numpy
  import tensorflow.compat.v1
  from gym.spaces import Discrete, Box, MultiDiscrete
label_desc: Use image node_id 13 for calling a global function with example usage: observation_placeholder(ob_space, batch_size, name) and returns: tf