class_docstr: Converts discrete action to one_hot format.
code: def _validate_action_spec(self):
      def _validate(action_spec):
          if (
              action_spec.dtype.is_integer
              and len(action_spec.shape.as_list()) > 1
          ):
              raise ValueError(
                  "OneHotActionWrapper only supports actions with at most one "
                  "dimension! action_spec: {}".format(action_spec)
              )
  
      tf.nest.map_structure(_validate, self._env.action_spec())
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from tf_agents.environments import tf_environment
  from tf_agents.specs import tensor_spec
label_desc: Use image node_id 2 for calling the OneHotActionWrapper obj's underlying member method code with example usage: obj._validate_action_spec() without return types