code: def test_one_hot_reset_layout():
      np.random.seed(42)
      layout = get_initial_layout(3)
      for axis in [-1, 0, 1, 2, 3]:
          yield partial(
              check_one_hot_operator, initial_layout=layout
          ), random_3d_tensors_batch, "cpu", axis
  
      yield check_one_hot_operator, random_scalars_batch
  
      def random_scalar_like_tensors():
          return random_scalar_like_tensors_batch(3)
  
      yield partial(
          check_one_hot_operator,
          axis=None,
          expected_output_dim=1,
          initial_layout=layout,
      ), random_scalar_like_tensors, "cpu"
  
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 14 for calling a global function with example usage: test_one_hot_reset_layout() and returns: random_scalar_like_tensors_batch