def patch_runway_config(request, monkeypatch, runway_config):
    """Patch Runway config and return a mock config object."""
    patch_path = getattr(request.module, 'PATCH_RUNWAY_CONFIG', None)
    if patch_path:
        monkeypatch.setattr(patch_path, runway_config)
    return runway_config