code: def inplace_func(
      inputs,
      outputs,
      mode=None,
      allow_input_downcast=False,
      on_unused_input="raise",
      name=None,
  ):
      if mode is None:
          mode = get_default_mode()
      return function(
          inputs,
          outputs,
          mode=mode,
          allow_input_downcast=allow_input_downcast,
          accept_inplace=True,
          on_unused_input=on_unused_input,
          name=name,
      )
  
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 3 for calling a global function with example usage: inplace_func(inputs, outputs, mode, allow_input_downcast, on_unused_input, name) and returns: function