code: def test_freeze() -> None:
      module = NestedModule(NestedModule(A()))
      module_frozen = gpflow.utilities.freeze(module)
      assert len(module.variables) == 2
      assert module_frozen.variables == ()
      assert isinstance(module.module.module.var, tf.Variable)
      assert isinstance(module_frozen.module.module.var, tf.Tensor)
  
imports: import copy
  import pickle
  from typing import Any, Type
  import pytest
  import tensorflow
  import tensorflow_probability
  from check_shapes import check_shapes
  from packaging.version import Version
  import gpflow
  from gpflow.base import TensorType
label_desc: Use image node_id 2 for calling a global function with example usage: test_freeze() without return types