code: def test_affine_shear():
      shear = 0.1
      # expected horizontal shear transform
      cx = -np.tan(shear)
      expected = np.array([[1, cx, 0], [0, 1, 0], [0, 0, 1]])
  
      tform = AffineTransform(shear=shear)
      assert_almost_equal(tform.params, expected)
  
      shear = (1.2, 0.8)
      # expected x, y shear transform
      cx = -np.tan(shear[0])
      cy = -np.tan(shear[1])
      expected = np.array([[1, cx, 0], [cy, 1, 0], [0, 0, 1]])
  
      tform = AffineTransform(shear=shear)
      assert_almost_equal(tform.params, expected)
  
imports: import re
  import textwrap
  import numpy
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_equal
  from skimage.transform import AffineTransform, EssentialMatrixTransform, EuclideanTransform, FundamentalMatrixTransform, PiecewiseAffineTransform, PolynomialTransform, ProjectiveTransform, SimilarityTransform, estimate_transform, matrix_transform
  from skimage.transform._geometric import _GeometricTransform, _affine_matrix_from_vector, _center_and_normalize_points, _euler_rotation_matrix
label_desc: Use image node_id 11 for calling a global function with example usage: test_affine_shear() without return types