import pytest
import uuid
import time


@pytest.fixture(params=[{"prefer": False}])
def additional_headers(request):
    """Set additional headers and optionally add prefer header"""
    headers = {"X-Request-ID": str(uuid.uuid1()), "X-Correlation-ID": str(uuid.uuid1())}
    if request.param["prefer"] is True:
        headers["Prefer"] = "respond-async"
    return headers


@pytest.fixture()
def set_delay():
    """time delay to prevent exceeding proxy rate limit"""
    return time.sleep(1.5)

import pytest
import uuid
import time


@pytest.fixture(params=[{"prefer": False}])
def additional_headers(request):
    """Set additional headers and optionally add prefer header"""
    headers = {"X-Request-ID": str(uuid.uuid1()), "X-Correlation-ID": str(uuid.uuid1())}
    if request.param["prefer"] is True:
        headers["Prefer"] = "respond-async"
    return headers


@pytest.fixture()
def set_delay():
    """time delay to prevent exceeding proxy rate limit"""
    return time.sleep(1.5)

Set additional headers and optionally add prefer header time delay to prevent exceeding proxy rate limit