code: def test_affine_transform_from_linearized_parameters():
      mat = np.concatenate(
          (np.random.random((3, 4)), np.eye(4)[-1:]), axis=0
      )
      v = mat[:-1].ravel()
      mat_from_v = _affine_matrix_from_vector(v)
      tf = AffineTransform(matrix=mat_from_v)
      assert_equal(np.array(tf), mat)
      # incorrect number of parameters
      with pytest.raises(ValueError):
          _ = _affine_matrix_from_vector(v[:-1])
      with pytest.raises(ValueError):
          _ = AffineTransform(matrix=v[:-1])
  
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 45 for calling a global function with example usage: test_affine_transform_from_linearized_parameters() without return types