code: def huber_loss(
      input: TensorLikeType,
      target: TensorLikeType,
      reduction: Union[str, int] = "mean",
      delta: float = 1.0,
  ) -> TensorLikeType:
      """
      Reference implementation of torch.nn.functional.huber_loss
      """
      if type(reduction) is int:
          reduction = _reduction_int_to_str(reduction)
      _check_reduction_value(reduction)  # type: ignore[arg-type]
      torch._check(
          delta > 0,
          lambda: "huber_loss does not support non-positive values for delta.",
      )
      z = (input - target).abs()
      loss = torch.where(
          z < delta, 0.5 * z * z, delta * (z - 0.5 * delta)
      )
      return _apply_loss_reduction(loss, reduction)
  
imports: import math
  from functools import wraps
  from typing import Callable, Optional, Union
  import torch
  import torch._prims
  import torch._prims_common
  import torch._refs
  from torch._decomp import register_decomposition
  from torch._prims_common import ELEMENTWISE_TYPE_PROMOTION_KIND, NumberType, ShapeType, TensorLike, TensorLikeType
  from torch._prims_common.wrappers import elementwise_type_promotion_wrapper, elementwise_unary_scalar_wrapper, out_wrapper
  from torch._refs import _make_inplace
label_desc: Use image node_id 30 for calling a global function with example usage: huber_loss(input, target, reduction, delta) and returns: _apply_loss_reduction