code: def setup_method(self):
      self.k = iscalar("k")
      self.A = vector("A")
      result, _ = scan(
          fn=lambda prior_result, A: prior_result * A,
          outputs_info=ones_like(self.A),
          non_sequences=self.A,
          n_steps=self.k,
      )
      result_check, _ = scan_checkpoints(
          fn=lambda prior_result, A: prior_result * A,
          outputs_info=ones_like(self.A),
          non_sequences=self.A,
          n_steps=self.k,
          save_every_N=100,
      )
      self.result = result[-1]
      self.result_check = result_check[-1]
      self.grad_A = grad(self.result.sum(), self.A)
      self.grad_A_check = grad(self.result_check.sum(), self.A)
  
file_path: pytensor/tests/scan/test_checkpoints.py
imports: import numpy
  import pytest
  from pytensor.compile.function import function
  from pytensor.gradient import grad
  from pytensor.scan.basic import scan
  from pytensor.scan.checkpoints import scan_checkpoints
  from pytensor.tensor.basic import ones_like
  from pytensor.tensor.type import iscalar, vector
label_desc: Use image node_id 1 for calling the TestScanCheckpoint obj's underlying member method code with example usage: obj.setup_method() without return types