code: def test_matrix_transforms_state_reset(
      img_5x5, ignore_state, pipeline
  ):
      n_iter = 50
      if pipeline:
          ppl = slc.Stream(
              [
                  slt.Rotate(
                      angle_range=(-180, 180),
                      p=1,
                      ignore_state=ignore_state,
                  ),
                  slt.Pad(pad_to=(10, 10)),
              ]
          )
      else:
          ppl = slt.Rotate(
              angle_range=(-180, 180), p=1, ignore_state=ignore_state
          )
  
      img_test = img_5x5.copy()
      img_test[0, 0] = 1
      random.seed(42)
  
      trf_not_eq = 0
      imgs_not_eq = 0
      for i in range(n_iter):
          dc1 = slc.DataContainer((img_test.copy(),), "I")
          dc2 = slc.DataContainer((img_test.copy(),), "I")
          if pipeline:
              dc1_res = ppl(dc1, return_torch=False).data[0].squeeze()
          else:
              dc1_res = ppl(dc1).data[0].squeeze()
          if pipeline:
              trf_state1 = ppl.transforms[0].state_dict[
                  "transform_matrix_corrected"
              ]
          else:
              trf_state1 = ppl.state_dict["transform_matrix_corrected"]
          if pipeline:
              dc2_res = ppl(dc2, return_torch=False).data[0].squeeze()
          else:
              dc2_res = ppl(dc2).data[0].squeeze()
          if pipeline:
              trf_state2 = ppl.transforms[0].state_dict[
                  "transform_matrix_corrected"
              ]
          else:
              trf_state2 = ppl.state_dict["transform_matrix_corrected"]
  
          if not np.array_equal(trf_state1, trf_state2):
              trf_not_eq += 1
  
          if not np.array_equal(dc1_res, dc2_res):
              imgs_not_eq += 1
  
      random.seed(None)
      assert trf_not_eq > n_iter // 2
      assert imgs_not_eq > n_iter // 2
  
imports: import itertools
  import random
  import cv2
  import numpy
  import pytest
  import torch
  import solt.core
  import solt.transforms
  import solt.utils
  from .fixtures import *
label_desc: Use image node_id 38 for calling a global function with example usage: test_matrix_transforms_state_reset(img_5x5, ignore_state, pipeline) without return types