code: def random_make_inplace(fgraph, node):
      op = node.op
  
      if isinstance(op, RandomVariable) and not op.inplace:
          props = op._props_dict()
          props["inplace"] = True
          new_op = type(op)(**props)
          return new_op.make_node(*node.inputs).outputs
  
      return False
  
imports: from itertools import chain
  from pytensor.compile import optdb
  from pytensor.configdefaults import config
  from pytensor.graph import ancestors
  from pytensor.graph.op import compute_test_value
  from pytensor.graph.rewriting.basic import copy_stack_trace, in2out, node_rewriter
  from pytensor.scalar import integer_types
  from pytensor.tensor import NoneConst
  from pytensor.tensor.basic import constant, get_vector_length
  from pytensor.tensor.elemwise import DimShuffle
  from pytensor.tensor.extra_ops import broadcast_to
  from pytensor.tensor.random.op import RandomVariable
  from pytensor.tensor.random.utils import broadcast_params
  from pytensor.tensor.shape import Shape, Shape_i, shape_padleft
  from pytensor.tensor.subtensor import AdvancedSubtensor, AdvancedSubtensor1, Subtensor, as_index_variable, get_idx_list
  from pytensor.tensor.type_other import SliceType
label_desc: Use image node_id 2 for calling a global function with example usage: random_make_inplace(fgraph, node) and returns: False, new_op