code: def test_leaf_components_registers_variable_properties(
      module_callable: Callable[[], Any],
      expected_param_dicts: Mapping[str, Any],
  ) -> None:
      module = module_callable()
      for path, variable in leaf_components(module).items():
          param_name = path.split(".")[-2] + "." + path.split(".")[-1]
          assert isinstance(variable, gpflow.Parameter)
          np.testing.assert_almost_equal(
              variable.numpy(),
              expected_param_dicts[param_name]["value"],
          )
          assert (
              variable.trainable
              == expected_param_dicts[param_name]["trainable"]
          )
          assert (
              variable.shape
              == expected_param_dicts[param_name]["shape"]
          )
  
imports: from typing import Any, Callable, Mapping, Optional, Type
  import numpy
  import pytest
  import tensorflow
  from _pytest.fixtures import SubRequest
  from packaging.version import Version
  import gpflow
  from gpflow.base import AnyNDArray
  from gpflow.config import Config, as_context
  from gpflow.utilities import set_trainable
  from gpflow.utilities.traversal import _merge_leaf_components, leaf_components, tabulate_module_summary
label_desc: Use image node_id 7 for calling a global function with example usage: test_leaf_components_registers_variable_properties(module_callable, expected_param_dicts) without return types