code: def local_set_to_inc_subtensor(fgraph, node):
      r"""
      AdvancedIncSubtensor1(x, x[ilist]+other, ilist, set_instead_of_inc=True) ->
      AdvancedIncSubtensor1(x, other, ilist, set_instead_of_inc=False)
  
      TODO FIXME: Why doesn't this apply to all `*IncSubtensor*` `Op`\s?  If it
      did this wouldn't need to also be included in the "specialize" pass.
  
      """
      if (
          isinstance(node.op, AdvancedIncSubtensor1)
          and node.op.set_instead_of_inc
          and node.inputs[1].owner
          and isinstance(node.inputs[1].owner.op, Elemwise)
          and isinstance(node.inputs[1].owner.op.scalar_op, ps.Add)
      ):
          addn = node.inputs[1].owner
          subn = None
          other = None
  
          if addn.inputs[0].owner and isinstance(
              addn.inputs[0].owner.op, AdvancedSubtensor1
          ):
              subn = addn.inputs[0].owner
              other = addn.inputs[1]
          elif addn.inputs[1].owner and isinstance(
              addn.inputs[1].owner.op, AdvancedSubtensor1
          ):
              subn = addn.inputs[1].owner
              other = addn.inputs[0]
          else:
              return
          if (
              subn.inputs[1] != node.inputs[2]
              or subn.inputs[0] != node.inputs[0]
          ):
              return
          ret = advanced_inc_subtensor1(
              node.inputs[0], other, node.inputs[2]
          )
  
          copy_stack_trace(node.outputs, ret)
  
          return [ret]
  
imports: import sys
  from collections.abc import Iterable
  import numpy
  import pytensor
  import pytensor.scalar.basic
  from pytensor import compile
  from pytensor.graph.basic import Constant, Variable
  from pytensor.graph.rewriting.basic import WalkingGraphRewriter, copy_stack_trace, in2out, node_rewriter
  from pytensor.raise_op import Assert
  from pytensor.tensor.basic import Alloc, Join, MakeVector, ScalarFromTensor, TensorFromScalar, alloc, as_tensor, cast, concatenate, extract_constant, get_underlying_scalar_constant_value, register_infer_shape, switch
  from pytensor.tensor.blockwise import Blockwise
  from pytensor.tensor.elemwise import Elemwise
  from pytensor.tensor.exceptions import NotScalarConstantError
  from pytensor.tensor.math import Dot, add, and_, ceil_intdiv, dot, eq, ge, gt, le, lt, maximum, minimum, or_
  from pytensor.tensor.math import all
  from pytensor.tensor.rewriting.basic import register_canonicalize, register_specialize, register_stabilize
  from pytensor.tensor.shape import Shape, SpecifyShape, Unbroadcast, shape_padleft, shape_tuple, specify_shape, unbroadcast
  from pytensor.tensor.sharedvar import TensorSharedVariable
  from pytensor.tensor.subtensor import AdvancedIncSubtensor, AdvancedIncSubtensor1, AdvancedSubtensor, AdvancedSubtensor1, IncSubtensor, Subtensor, advanced_inc_subtensor1, advanced_subtensor, advanced_subtensor1, as_index_constant, as_index_literal, get_canonical_form_slice, get_constant_idx, get_idx_list, get_slice_elements, inc_subtensor, indices_from_subtensor
  from pytensor.tensor.type import TensorType
  from pytensor.tensor.type_other import NoneTypeT, SliceConstant, SliceType
  from pytensor.tensor.variable import TensorConstant, TensorVariable
label_desc: Use image node_id 16 for calling a global function with example usage: local_set_to_inc_subtensor(fgraph, node) and returns: list