code: def test_callback(ray_instance, capsys):
      """Test callback function works in http proxy and controller"""
  
      @serve.deployment
      class Model:
          def __call__(self, request: starlette.requests.Request):
              headers = request.scope.get("headers")
              for k, v in headers:
                  if k == b"custom_header_key":
                      return v
              return "Not found custom headers"
  
      serve.run(Model.bind())
      resp = requests.get("http://localhost:8000/")
      assert resp.text == "custom_header_value"
  
      captured = capsys.readouterr()
      assert "MyCustom message: hello" in captured.err
  
imports: import importlib
  import logging
  import os
  import sys
  import pytest
  import requests
  import starlette
  from starlette.middleware import Middleware
  import ray
  from ray import serve
  from ray._private.test_utils import wait_for_condition
  from ray.exceptions import RayActorError
  from ray.serve._private.common import ProxyStatus
  from ray.serve._private.utils import call_function_from_import_path
  from ray.serve.context import _get_global_client
  from ray.serve.schema import LoggingConfig, ServeInstanceDetails
label_desc: Use image node_id 7 for calling a global function with example usage: test_callback(ray_instance, capsys) and returns: str, v