code: def request_blocker(request: pytest.FixtureRequest, monkeypatch):
      """
      This fixture is applied automatically to all tests.
      Those that are not marked as integration will have the requests module
      monkeypatched to avoid making HTTP requests by mistake.
      """
      marker = request.node.get_closest_marker("integration")
      if marker is not None:
          return
  
      def urlopen_mock(self, method, url, *args, **kwargs):
          raise RuntimeError(
              f"The test was about to {method} {self.scheme}://{self.host}{url}"
          )
  
      monkeypatch.setattr(
          "urllib3.connectionpool.HTTPConnectionPool.urlopen",
          urlopen_mock,
      )
  
file_path: haystack/test/conftest.py
imports: from datetime import datetime
  from pathlib import Path
  from unittest.mock import Mock, patch
  import pytest
  from openai.types.chat import ChatCompletion, ChatCompletionMessage
  from openai.types.chat.chat_completion import Choice
  from haystack.testing.test_utils import set_all_seeds
label_desc: Use image node_id 4 for calling a global function with example usage: request_blocker(request, monkeypatch) without return types