code: def test_from_dict_without_registered_component_type(request):
      data = {
          "metadata": {"test": "test"},
          "max_loops_allowed": 100,
          "components": {
              "add_two": {
                  "type": "foo.bar.baz",
                  "init_parameters": {"add": 2},
              }
          },
          "connections": [],
      }
      with pytest.raises(PipelineError) as err:
          Pipeline.from_dict(data)
  
      err.match(r"Component .+ not imported.")
  
imports: from typing import Optional
  import logging
  import pytest
  from haystack.core.pipeline import Pipeline
  from haystack.core.component.sockets import InputSocket, OutputSocket
  from haystack.core.errors import PipelineMaxLoops, PipelineError, PipelineRuntimeError
  from haystack.testing.sample_components import AddFixedValue, Threshold, Double, Sum
  from haystack.testing.factory import component_class
label_desc: Use image node_id 8 for calling a global function with example usage: test_from_dict_without_registered_component_type(request) without return types