code: def test_one_hot():
      np.random.seed(42)
      for device in ["cpu", "gpu"]:
          layout = get_initial_layout(3)
          for i in range(10):
              for axis in [-1, 0, 1, 2, 3]:
                  yield partial(
                      check_one_hot_operator,
                      axis_name="O",
                      initial_layout=layout,
                  ), random_3d_tensors_batch, device, axis
  
imports: from functools import partial
  from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  import nvidia.dali.types
  from test_utils import check_batch
  from nose_utils import raises
  import numpy
label_desc: Use image node_id 12 for calling a global function with example usage: test_one_hot() without return types