code: def __init__(self, onnx_node, run_params):  # type: ignore
      OpRun.__init__(self, onnx_node, run_params)
      if not hasattr(self.body, "run"):  # type: ignore
          raise RuntimeError(
              f"Parameter 'body' must have a method 'run', type {type(self.body)}."  # type: ignore
          )
      self.input_directions_ = [
          0
          if self.scan_input_directions is None  # type: ignore
          or i >= len(self.scan_input_directions)  # type: ignore
          else self.scan_input_directions[i]  # type: ignore
          for i in range(self.num_scan_inputs)  # type: ignore
      ]
      max_dir_in = max(self.input_directions_)
      if max_dir_in != 0:
          raise RuntimeError(
              "Scan is not implemented for other output input_direction than 0."
          )
      self.input_axes_ = [
          0
          if self.scan_input_axes is None or i >= len(self.scan_input_axes)  # type: ignore
          else self.scan_input_axes[i]  # type: ignore
          for i in range(self.num_scan_inputs)  # type: ignore
      ]
      max_axe_in = max(self.input_axes_)
      if max_axe_in != 0:
          raise RuntimeError(
              "Scan is not implemented for other input axes than 0."
          )
      self.input_names = self.body.input_names  # type: ignore
      self.output_names = self.body.output_names
  
imports: import numpy
  from onnx.reference.op_run import OpRun
label_desc: Use image node_id 1 to create a new Scan object from inherited base classes: OpRun with example: obj = Scan(onnx_node, run_params)