code: def binary_to_nary_func(
      inputs: list[Variable], binary_op_name: str, binary_op: str
  ):
      """Create a Numba-compatible N-ary function from a binary function."""
      unique_names = unique_name_generator(
          ["binary_op_name"], suffix_sep="_"
      )
      input_names = [unique_names(v, force_unique=True) for v in inputs]
      input_signature = ", ".join(input_names)
      output_expr = binary_op.join(input_names)
  
      nary_src = f"""
  def {binary_op_name}({input_signature}):
      return {output_expr}
      """
      nary_fn = compile_function_src(
          nary_src, binary_op_name, globals()
      )
  
      return nary_fn
  
imports: import math
  import numpy
  from pytensor import config
  from pytensor.compile.ops import ViewOp
  from pytensor.graph.basic import Variable
  from pytensor.link.numba.dispatch import basic
  from pytensor.link.numba.dispatch.basic import create_numba_signature, generate_fallback_impl, numba_funcify
  from pytensor.link.numba.dispatch.cython_support import wrap_cython_function
  from pytensor.link.utils import compile_function_src, get_name_for_object, unique_name_generator
  from pytensor.scalar.basic import Add, Cast, Clip, Composite, Identity, Mul, Reciprocal, ScalarOp, Second, Switch
  from pytensor.scalar.math import Erf, Erfc, GammaLn, Log1mexp, Sigmoid
label_desc: Use image node_id 4 for calling a global function with example usage: binary_to_nary_func(inputs, binary_op_name, binary_op) and returns: nary_fn