code: def l1_loss(
      input: TensorLikeType,
      target: TensorLikeType,
      size_average: Optional[bool] = None,
      reduce: Optional[bool] = None,
      reduction: str = "mean",
  ) -> TensorLikeType:
      """
      Reference implementation of torch.nn.functional.l1_loss
      """
      if size_average is not None or reduce is not None:
          # TODO: Raise exception instead of converting value.  This is only for
          # primTorch since it can drop support for deprecated arguments.
          # msg = "size_average and reduce args are deprecated, please use reduction argument."
          reduction = _get_string_reduction_arg(
              size_average=size_average, reduce=reduce
          )
      _check_reduction_value(reduction)
      loss = torch.abs(input - target)
      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 22 for calling a global function with example usage: l1_loss(input, target, size_average, reduce, reduction) and returns: _apply_loss_reduction