code: def test_loadcomponents_from_generated_class(
      write_metadata_file, make_namespace
  ):
      my_component_runtime = generate_class(
          "MyComponent",
          METADATA["MyComponent.react.js"]["props"],
          METADATA["MyComponent.react.js"]["description"],
          "default_namespace",
      )
  
      a_runtime = generate_class(
          "A",
          METADATA["A.react.js"]["props"],
          METADATA["A.react.js"]["description"],
          "default_namespace",
      )
  
      generate_classes("default_namespace", METADATA_PATH)
      from default_namespace.MyComponent import (
          MyComponent as MyComponent_buildtime,
      )
      from default_namespace.A import A as A_buildtime
  
      my_component_kwargs = {
          "foo": "Hello World",
          "bar": "Lah Lah",
          "baz": "Lemons",
          "data-foo": "Blah",
          "aria-bar": "Seven",
          "children": "Child",
      }
      a_kwargs = {"children": "Child", "href": "Hello World"}
  
      assert isinstance(
          MyComponent_buildtime(**my_component_kwargs), Component
      )
  
      assert repr(MyComponent_buildtime(**my_component_kwargs)) == repr(
          my_component_runtime(**my_component_kwargs)
      )
  
      assert repr(a_runtime(**a_kwargs)) == repr(
          A_buildtime(**a_kwargs)
      )
  
file_path: dash/tests/unit/development/test_component_loader.py
imports: import collections
  import json
  import os
  import shutil
  import pytest
  from dash.development._py_components_generation import generate_class
  from dash.development.base_component import Component
  from dash.development.component_loader import load_components, generate_classes
label_desc: Use image node_id 4 for calling a global function with example usage: test_loadcomponents_from_generated_class(write_metadata_file, make_namespace) without return types