docstr: s
docstr_tok: ["s"]
code: def test_affine_rot90(self, s):
      """s"""
      im = np.arange(int(s * s)).reshape(1, s, s).astype(float)
      mat = np.array([[0, 1, 0], [-1, 0, 0], [0, 0, 1]])
  
      def method_0(im, ac):
          xform = Affine(
              align_corners=ac,
              affine=mat,
              image_only=True,
              spatial_size=s,
          )
          xform.lazy = True
          out = xform(im)
          out = apply_pending(
              out,
              overrides={"padding_mode": "border", "align_corners": ac},
          )[0]
          return out
  
      def method_1(im, ac):
          xform = Affine(
              align_corners=ac,
              affine=mat,
              image_only=True,
              spatial_size=s,
          )
          xform.lazy = True
          out = xform(im)
          out = apply_pending(
              out,
              overrides={
                  "mode": 1,
                  "padding_mode": "nearest",
                  "align_corners": ac,
              },
          )[0]
          return out
  
      def method_2(im, ac):
          xform = Affine(
              align_corners=ac,
              affine=mat,
              padding_mode="border",
              image_only=True,
              spatial_size=s,
          )
          out = xform(im)
          return out
  
      def method_3(im, ac):
          xform = Affine(
              align_corners=ac,
              affine=mat,
              mode=1,
              padding_mode="nearest",
              image_only=True,
              spatial_size=s,
          )
          out = xform(im)
          return out
  
      for call in (method_0, method_1, method_2, method_3):
          for ac in (False, True):
              out = call(im, ac)
              ref = Rotate90()(im)
              assert_allclose(
                  out, ref, rtol=1e-4, atol=1e-4, type_test=False
              )
  
imports: from __future__ import annotations
  import unittest
  import numpy
  from parameterized import parameterized
  from monai.data import MetaTensor, set_track_meta
  from monai.transforms import Affine, Rotate90
  from monai.transforms.lazy.functional import apply_pending
  from monai.utils import optional_import
  from tests.lazy_transforms_utils import test_resampler_lazy
  from tests.utils import TEST_NDARRAYS_ALL, NumpyImageTestCase2D, NumpyImageTestCase3D, assert_allclose, test_local_inversion
label_desc: Use image node_id 1 for calling the TestRot90Consistency obj's underlying member method code with example usage: obj.test_affine_rot90(s) and returns: out, out, out, out