class_docstr: Parses the inputs and outputs of `Scan` in an easy to manipulate format.
class_docstr_tok: ["Parses","the","inputs","and","outputs","of","`","Scan","`","in","an","easy","to","manipulate","format","."]
code: def merge(self, other: "ScanArgs") -> "ScanArgs":
      res = copy.copy(self)
      for attr in self.__dict__:
          if (
              attr.startswith("inner_in")
              or attr.startswith("inner_out")
              or attr.startswith("outer_in")
              or attr.startswith("outer_out")
              or attr
              in (
                  "mit_mot_out_slices",
                  "mit_mot_in_slices",
                  "mit_sot_in_slices",
              )
          ):
              getattr(res, attr).extend(getattr(other, attr))
      return res
  
imports: import copy
  import dataclasses
  import logging
  from collections import OrderedDict, namedtuple
  from collections.abc import Sequence
  from itertools import chain
  from typing import TYPE_CHECKING, Callable, Optional, Union
  from typing import cast
  import numpy
  from pytensor import scalar
  from pytensor import tensor
  from pytensor.compile.profiling import ProfileStats
  from pytensor.configdefaults import config
  from pytensor.graph.basic import Constant, Variable, equal_computations, graph_inputs
  from pytensor.graph.op import get_test_value
  from pytensor.graph.replace import clone_replace
  from pytensor.graph.type import HasDataType
  from pytensor.graph.utils import TestValueError
  from pytensor.tensor.basic import AllocEmpty, cast
  from pytensor.tensor.subtensor import set_subtensor
  from pytensor.tensor.variable import TensorConstant
label_desc: Use image node_id 19 for calling the ScanArgs obj's underlying member method code with example usage: obj.merge(other) and returns: res