code: def test_from_dict_import_type():
      pipeline_dict = {
          "metadata": {},
          "max_loops_allowed": 100,
          "components": {
              "greeter": {
                  "type": "haystack.testing.sample_components.greet.Greet",
                  "init_parameters": {
                      "message": "\nGreeting component says: Hi! The value is {value}\n",
                      "log_level": "INFO",
                  },
              }
          },
          "connections": [],
      }
  
      # remove the target component from the registry if already there
      component.registry.pop(
          "haystack.testing.sample_components.greet.Greet", None
      )
      # remove the module from sys.modules if already there
      sys.modules.pop("haystack.testing.sample_components.greet", None)
  
      p = Pipeline.from_dict(pipeline_dict)
  
      from haystack.testing.sample_components.greet import Greet
  
      assert type(p.get_component("greeter")) == Greet
  
file_path: haystack/test/core/test_serialization.py
imports: import sys
  from unittest.mock import Mock
  import pytest
  from haystack.core.pipeline import Pipeline
  from haystack.core.component import component
  from haystack.core.errors import DeserializationError
  from haystack.testing import factory
  from haystack.core.serialization import default_to_dict, default_from_dict
label_desc: Use image node_id 6 for calling a global function with example usage: test_from_dict_import_type() without return types