code: def test_transform_bounds(
      fmodel_and_data: ModelAndData, bounds: fbn.types.BoundsInput
  ) -> None:
      fmodel1, x, y = fmodel_and_data
      logits1 = fmodel1(x)
      min1, max1 = fmodel1.bounds
  
      fmodel2 = fmodel1.transform_bounds(bounds)
      min2, max2 = fmodel2.bounds
      x2 = (x - min1) / (max1 - min1) * (max2 - min2) + min2
      logits2 = fmodel2(x2)
  
      np.testing.assert_allclose(
          logits1.numpy(), logits2.numpy(), rtol=1e-4, atol=1e-4
      )
  
      # to make sure fmodel1 is not changed in-place
      logits1b = fmodel1(x)
      np.testing.assert_allclose(
          logits1.numpy(), logits1b.numpy(), rtol=2e-6
      )
  
      fmodel1c = fmodel2.transform_bounds(fmodel1.bounds)
      logits1c = fmodel1c(x)
      np.testing.assert_allclose(
          logits1.numpy(), logits1c.numpy(), rtol=1e-4, atol=1e-4
      )
  
file_path: foolbox/tests/test_models.py
imports: from typing import Tuple, Any
  import pytest
  import eagerpy
  import numpy
  import copy
  import foolbox
label_desc: Use image node_id 7 for calling a global function with example usage: test_transform_bounds(fmodel_and_data, bounds) without return types