code: def test_template_override_component(template, tmp_path):
      _create(
          "MyComponent",
          tmp_path,
          template=template,
          overwrite=True,
          install=False,
          configure_metadata=False,
      )
      app = (tmp_path / "demo" / "app.py").read_text()
      answer = textwrap.dedent(
          f"""
  import gradio as gr
  from gradio_mycomponent import MyComponent
  
  {OVERRIDES[template].demo_code.format(name="MyComponent")}
  
  demo.launch()
  """
      )
      assert app.strip() == answer.strip()
      assert (
          tmp_path / "backend" / "gradio_mycomponent" / "mycomponent.py"
      ).exists()
  
file_path: gradio/test/test_gradio_component_cli.py
imports: import shutil
  import textwrap
  from pathlib import Path
  import pytest
  from gradio.cli.commands.components._create_utils import OVERRIDES
  from gradio.cli.commands.components.create import _create
  from gradio.cli.commands.components.publish import _get_version_from_file
  from gradio.cli.commands.components.show import _show
label_desc: Use image node_id 1 for calling a global function with example usage: test_template_override_component(template, tmp_path) without return types