code: def test_from_dict_without_component_type():
      data = {
          "metadata": {"test": "test"},
          "max_loops_allowed": 100,
          "components": {"add_two": {"init_parameters": {"add": 2}}},
          "connections": [],
      }
      with pytest.raises(PipelineError) as err:
          Pipeline.from_dict(data)
  
      err.match("Missing 'type' in component 'add_two'")
  
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 7 for calling a global function with example usage: test_from_dict_without_component_type() without return types