code: def test_affine_scale_ratio(params):
      set_seed(0)
      aug = A.Affine(**params, p=1.0)
      image = np.random.randint(
          low=0, high=256, size=(100, 100, 3), dtype=np.uint8
      )
      target = {"image": image}
      apply_params = aug.get_params_dependent_on_targets(target)
  
      if "keep_ratio" not in params:
          # default(keep_ratio=False)
          assert (
              apply_params["scale"]["x"] != apply_params["scale"]["y"]
          )
      elif not params["keep_ratio"]:
          # keep_ratio=False
          assert (
              apply_params["scale"]["x"] != apply_params["scale"]["y"]
          )
      else:
          # keep_ratio=True
          assert (
              apply_params["scale"]["x"] == apply_params["scale"]["y"]
          )
  
imports: import random
  from functools import partial
  import cv2
  import numpy
  import pytest
  import albumentations
  import albumentations.augmentations.functional
  import albumentations.augmentations.geometric.functional
  from albumentations.augmentations.blur.functional import gaussian_blur
  from .utils import get_dual_transforms, get_image_only_transforms, get_transforms
label_desc: Use image node_id 47 for calling a global function with example usage: test_affine_scale_ratio(params) without return types