code: def do_request(server, content):
      request = FakeRequest(content + " HTTP/1.1")
      server.RequestHandlerClass(request, ("127.0.0.1", 0), server)
      response = request.out_file.getvalue()
  
      headers, _, content = response.partition(b"\r\n\r\n")
      status, _, headers = headers.partition(b"\r\n")
      status = status.split(None, 1)[1].decode()
  
      headers = email.message_from_bytes(headers)
      headers["_status"] = status
      return headers, content.decode()
  
imports: import contextlib
  import email
  import io
  import sys
  import threading
  import time
  import unittest
  from pathlib import Path
  from unittest import mock
  from mkdocs.livereload import LiveReloadServer
  from mkdocs.tests.base import change_dir, tempdir
label_desc: Use image node_id 2 for calling a global function with example usage: do_request(server, content) and returns: headers,  content