code: def check_out_param(out, t, casting):
      from .base import broadcast_to
  
      if not hasattr(out, "shape"):
          raise TypeError("return arrays must be a tensor")
  
      try:
          broadcast_to(t, out.shape)
      except ValueError:
          raise ValueError(
              "operands could not be broadcast together "
              "with shapes ({0}) ({1})".format(
                  ",".join(str(s) for s in t.shape),
                  ",".join(str(s) for s in out.shape),
              )
          )
  
      if not np.can_cast(t.dtype, out.dtype, casting):
          raise TypeError(
              f"output (typecode '{t.dtype.char}') could not be coerced "
              f"to provided output parameter (typecode '{out.dtype.char}') "
              f"according to the casting rule ''{casting}''"
          )
  
imports: import inspect
  import itertools
  import operator
  from collections import OrderedDict
  from collections.abc import Iterable
  from functools import lru_cache, reduce, wraps
  from math import ceil
  from numbers import Integral
  from typing import Dict, List, Union
  import numpy
  from ..core import ExecutableTuple, recursive_tile
  from ..utils import lazy_import
  from ..lib.mmh3 import hash_from_buffer
label_desc: Use image node_id 22 for calling a global function with example usage: check_out_param(out, t, casting) without return types