code: def component_written_class():
      path = os.path.join(_dir, "metadata_required_test.json")
      with open(path) as data_file:
          json_string = data_file.read()
          required_data = json.JSONDecoder(
              object_pairs_hook=OrderedDict
          ).decode(json_string)
  
      return generate_class(
          typename="TableRequired",
          props=required_data["props"],
          description=required_data["description"],
          namespace="TableComponents",
      )
  
imports: import json
  import os
  from collections import OrderedDict
  from difflib import unified_diff
  import pytest
  from dash.development._py_components_generation import generate_class
  from dash.development.component_generator import reserved_words
  from .None import _dir, expected_table_component_doc
label_desc: Use image node_id 2 for calling a global function with example usage: component_written_class() and returns: generate_class