code: def test_load_transforms_from_string():
      """When the pre-processor is instantiated via a transform config file, it
      should work with either string or A.Compose and return a ValueError
      otherwise."""
  
      config_path = tempfile.NamedTemporaryFile(suffix=".yaml").name
  
      # Create a dummy transformation.
      transforms = A.Compose(
          [
              A.Resize(1024, 1024, always_apply=True),
              A.CenterCrop(256, 256, always_apply=True),
              A.Resize(224, 224, always_apply=True),
          ]
      )
      A.save(
          transform=transforms, filepath=config_path, data_format="yaml"
      )
  
      # Pass a path to config
      transform = get_transforms(config=config_path)
      assert isinstance(transform, A.Compose)
  
      # Pass a config of type A.Compose
      transform = get_transforms(config=transforms)
      assert isinstance(transform, A.Compose)
  
      # Anything else should raise an error
      with pytest.raises(ValueError):
          get_transforms(config=0)
  
file_path: anomalib/tests/pre_merge/pre_processing/transforms/test_transforms.py
imports: import tempfile
  import albumentations
  import numpy
  import pytest
  import skimage
  from torch import Tensor
  from anomalib.data.utils import get_transforms
label_desc: Use image node_id 6 for calling a global function with example usage: test_load_transforms_from_string() without return types