code: def test_keyword_only_args():
      @component
      class MockComponent:
          def __init__(self):
              component.set_output_types(self, value=int)
  
          def run(self, *, arg: int):
              return {"value": arg}
  
      comp = MockComponent()
      component_inputs = {
          name: {"type": socket.type}
          for name, socket in comp.__canals_input__.items()
      }
      assert component_inputs == {"arg": {"type": int}}
  
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 10 for calling a global function with example usage: test_keyword_only_args() and returns: dict