code: def test_transforms_not_in_registry_and_in_when_initialized():
      with pytest.raises(ValueError):
          slu.from_dict(
              {
                  "stream": {
                      "transforms": [
                          {"mycrop": {"crop_to": 32, "crop_mode": "c"}},
                      ]
                  }
              }
          )
  
      assert "mycrop" not in slc.BaseTransform.registry
  
      class MyCrop(slc.BaseTransform):
          serializable_name = "mycrop"
  
      assert "mycrop" in slc.BaseTransform.registry
  
file_path: solt/tests/test_utils.py
imports: import solt.utils
  import solt.transforms
  import solt.core
  import pytest
  import json
  import pathlib
  import yaml
label_desc: Use image node_id 10 for calling a global function with example usage: test_transforms_not_in_registry_and_in_when_initialized() without return types