code: def test_missing_run():
      with pytest.raises(
          ComponentError, match=r"must have a 'run\(\)' method"
      ):
  
          @component
          class MockComponent:
              def another_method(self, input_value: int):
                  return {"output_value": input_value}
  
file_path: haystack/test/core/component/test_component.py
imports: import typing
  from typing import Any, Optional
  import pytest
  from haystack.core.component import component
  from haystack.core.errors import ComponentError
  from haystack.core.component import InputSocket, OutputSocket, Component
label_desc: Use image node_id 4 for calling a global function with example usage: test_missing_run() and returns: dict