code: def make_outputs(
      ctx: numba.core.base.BaseContext,
      builder: ir.IRBuilder,
      iter_shape: tuple[ir.Instruction, ...],
      out_bc: tuple[tuple[bool, ...], ...],
      dtypes: tuple[Any, ...],
      inplace: tuple[tuple[int, int], ...],
      inputs: tuple[Any, ...],
      input_types: tuple[Any, ...],
  ):
      arrays = []
      ar_types: list[types.Array] = []
      one = ir.IntType(64)(1)
      inplace_dict = dict(inplace)
      for i, (bc, dtype) in enumerate(zip(out_bc, dtypes)):
          if i in inplace_dict:
              arrays.append(inputs[inplace_dict[i]])
              ar_types.append(input_types[inplace_dict[i]])
              # We need to incref once we return the inplace objects
              continue
          dtype = numba.from_dtype(np.dtype(dtype))
          arrtype = types.Array(dtype, len(iter_shape), "C")
          ar_types.append(arrtype)
          # This is actually an internal numba function, I guess we could
          # call `numba.nd.unsafe.ndarray` instead?
          shape = [
              length if not bc_dim else one
              for length, bc_dim in zip(iter_shape, bc)
          ]
          array = arrayobj._empty_nd_impl(ctx, builder, arrtype, shape)
          arrays.append(array)
  
      # If there is no inplace operation, we know that all output arrays
      # don't alias. Informing llvm can make it easier to vectorize.
      if not inplace:
          # The first argument is the output pointer
          arg = builder.function.args[0]
          arg.add_attribute("noalias")
      return arrays, ar_types
  
file_path: pytensor/pytensor/link/numba/dispatch/elemwise_codegen.py
imports: from __future__ import annotations
  from typing import Any
  import numba
  import numpy
  from llvmlite import ir
  from numba import types
  from numba.core import cgutils
  from numba.core.base import BaseContext
  from numba.np import arrayobj
label_desc: Use image node_id 2 for calling a global function with example usage: make_outputs(ctx, builder, iter_shape, out_bc, dtypes, inplace, inputs, input_types) and returns: arrays,  ar_types