code: def test_to_plotly_json(component_class):
      c = component_class()
      assert c.to_plotly_json() == {
          "namespace": "TableComponents",
          "type": "Table",
          "props": {"children": None},
      }
  
      c = component_class(id="my-id")
      assert c.to_plotly_json() == {
          "namespace": "TableComponents",
          "type": "Table",
          "props": {"children": None, "id": "my-id"},
      }
  
      c = component_class(id="my-id", optionalArray=None)
      assert c.to_plotly_json() == {
          "namespace": "TableComponents",
          "type": "Table",
          "props": {
              "children": None,
              "id": "my-id",
              "optionalArray": None,
          },
      }
  
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 3 for calling a global function with example usage: test_to_plotly_json(component_class) without return types