code: def test_correct_declaration_with_additional_readonly_property():
      @component
      class MockComponent:
          @property
          def store(self):
              return "test_store"
  
          def to_dict(self):
              return {}
  
          @classmethod
          def from_dict(cls, data):
              return cls()
  
          @component.output_types(output_value=int)
          def run(self, input_value: int):
              return {"output_value": input_value}
  
      # Verifies that instantiation works with no issues
      assert MockComponent()
      assert (
          component.registry["test_component.MockComponent"]
          == MockComponent
      )
      assert MockComponent().store == "test_store"
  
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 2 for calling a global function with example usage: test_correct_declaration_with_additional_readonly_property() and returns: str, dict, cls, dict