code: def test_request_id_header_by_default(serve_instance):
      """Test that a request_id is generated by default and returned as a header."""
  
      @serve.deployment
      class Model:
          def __call__(self):
              request_id = (
                  ray.serve.context._serve_request_context.get().request_id
              )
              return request_id
  
      serve.run(Model.bind())
      resp = requests.get("http://localhost:8000")
      assert resp.status_code == 200
      assert resp.text == resp.headers["x-request-id"]
  
      def is_valid_uuid(num: str):
          try:
              uuid.UUID(num, version=4)
              return True
          except ValueError:
              return False
  
      assert is_valid_uuid(resp.text)
  
file_path: ray/python/ray/serve/tests/test_http_headers.py
imports: import uuid
  import pytest
  import requests
  import starlette
  from fastapi import FastAPI
  import ray
  from ray import serve
label_desc: Use image node_id 1 for calling a global function with example usage: test_request_id_header_by_default(serve_instance) and returns: request_id, True, False