code: def placeholder_from_space(space):
      if isinstance(space, Box):
          return placeholder(space.shape)
      elif isinstance(space, Discrete):
          return tf.placeholder(dtype=tf.int32, shape=(None,))
      raise NotImplementedError
  
imports: import numpy
  import tensorflow
  import scipy.signal
  from gym.spaces import Box, Discrete
label_desc: Use image node_id 6 for calling a global function with example usage: placeholder_from_space(space) and returns: placeholder, tf