code: def makeBroadcastTester(
      op, expected, checks=None, name=None, **kwargs
  ):
      if checks is None:
          checks = {}
      if name is None:
          name = str(op)
      # Here we ensure the test name matches the name of the variable defined in
      # this script. This is needed to properly identify the test e.g. with the
      # --with-id option of nosetests, or simply to rerun a specific test that
      # failed.
      capitalize = False
      if name.startswith("Elemwise{") and name.endswith(",no_inplace}"):
          # For instance: Elemwise{add,no_inplace} -> Add
          name = name[9:-12]
          capitalize = True
      elif name.endswith("_inplace"):
          # For instance: sub_inplace -> SubInplace
          capitalize = True
      if capitalize:
          name = "".join([x.capitalize() for x in name.split("_")])
      # Some tests specify a name that already ends with 'Tester', while in other
      # cases we need to add it manually.
      if not name.endswith("Tester"):
          name += "Tester"
      if "inplace" in kwargs:
          if kwargs["inplace"]:
              _expected = expected
              if not isinstance(_expected, dict):
  
                  def expected(*inputs):
                      return np.array(
                          _expected(*inputs), dtype=inputs[0].dtype
                      )
  
              def inplace_check(inputs, outputs):
                  # this used to be inputs[0] is output[0]
                  # I changed it so that it was easier to satisfy by the
                  # DebugMode
                  return np.all(inputs[0] == outputs[0])
  
              checks = dict(checks, inplace_check=inplace_check)
          del kwargs["inplace"]
      return makeTester(name, op, expected, checks, **kwargs)
  
imports: import os
  from copy import copy
  from itertools import combinations
  from tempfile import mkstemp
  import numpy
  import pytest
  import pytensor
  from pytensor import function, shared
  from pytensor.compile.mode import get_default_mode
  from pytensor.configdefaults import config
  from pytensor.graph.utils import MethodNotDefined
  from pytensor.misc.safe_asarray import _asarray
  from pytensor.tensor.type import TensorType, complex_dtypes, discrete_dtypes, float_dtypes
  from tests import unittest_tools
label_desc: Use image node_id 25 for calling a global function with example usage: makeBroadcastTester(op, expected, checks, name) and returns: makeTester, np, np