code: def one_hot(indices, on_value, off_value, depth, axis, dtype):
      """Returns a one-hot tensor where the locations represented by indices take value on_value,
      and other locations take value off_value.
      Final dimension is <indices outer dimensions> x depth x <indices inner dimensions>.
  
      Parameters
      ----------
      indices : relay.Expr
          Locations to set to on_value.
  
      on_value : relay.Expr
          Value to fill at indices.
  
      off_value : relay.Expr
          Value to fill at all other positions besides indices.
  
      depth : int or relay.Expr
          Depth of the one-hot dimension.
  
      axis : int
          Axis to fill.
  
      dtype : str
          Data type of the output tensor.
  
      Returns
      -------
      ret : relay.Expr
          The one-hot tensor.
  
      Examples
      --------
      .. code-block:: python
  
          indices = [0, 1, 2]
  
          relay.one_hot(indices, 3) =
              [[1, 0, 0],
               [0, 1, 0],
               [0, 0, 1]]
      """
      if isinstance(depth, Constant):
          depth = depth.data.numpy().item()
      if isinstance(depth, Expr):
          return _dyn_make.one_hot(
              indices, on_value, off_value, depth, axis, dtype
          )
      return _make.one_hot(
          indices, on_value, off_value, depth, axis, dtype
      )
  
imports: from ...tir import expr
  from ..expr import Constant, Expr, Tuple, TupleWrapper, const
  from .None import _make
  from .dyn import _make
  from .tensor import shape_of
label_desc: Use image node_id 36 for calling a global function with example usage: one_hot(indices, on_value, off_value, depth, axis, dtype) and returns: _make, _dyn_make