code: def test_one_hot_pre_processors_discrete():
      """perception test"""
      obs_space = gym.spaces.Discrete(n=10)
      sample = obs_space.sample()
  
      processor = OneHotPreProcessor(observation_space=obs_space)
  
      assert processor.processed_shape() == (10,)
  
      processed = processor.process(sample)
      assert processed.shape == (10,)
      assert np.sum(processed) == 1
      assert processed[sample] == 1
  
file_path: maze/maze/test/core/wrappers/observation_preprocessing/preprocessors/test_preprocessors.py
imports: import gym
  import numpy
  from maze.core.wrappers.observation_preprocessing.preprocessors.flatten import FlattenPreProcessor
  from maze.core.wrappers.observation_preprocessing.preprocessors.one_hot import OneHotPreProcessor
  from maze.core.wrappers.observation_preprocessing.preprocessors.resize_img import ResizeImgPreProcessor
  from maze.core.wrappers.observation_preprocessing.preprocessors.rgb2gray import Rgb2GrayPreProcessor
  from maze.core.wrappers.observation_preprocessing.preprocessors.transpose import TransposePreProcessor
  from maze.core.wrappers.observation_preprocessing.preprocessors.unsqueeze import UnSqueezePreProcessor
  from maze.test.shared_test_utils.space_testing_utils import build_dict_obs_space
label_desc: Use image node_id 2 for calling a global function with example usage: test_one_hot_pre_processors_discrete() without return types