def replace_headers(request, replacements):
    new_headers = request.headers.copy()
    for k, rv in replacements:
        if k in new_headers:
            ov = new_headers.pop(k)
            if callable(rv):
                rv = rv(key=k, value=ov, request=request)
            if rv is not None:
                new_headers[k] = rv
    request.headers = new_headers
    return request
Retrieves a value from the config parser.
dataset/ETHPy150Open kevin1024/vcrpy/vcr/filters.py/replace_headers--crossover with--dataset/ETHPy150Open libyal/libyal/scripts/source-generate.py/ProjectConfiguration._GetConfigValue