def METHOD_NAME(config):
    images = config.getoption('--image')
    compose_services = config.getoption('--compose-service')
    if compose_services or not images:
        with open('compose.yaml') as f:
            compose_config = yaml.safe_load(f)
        if not compose_services:
            compose_services = compose_config['services'].keys()
        images = images + [
            compose_config['services'][name]['image']
            for name in compose_services
        ]
    config.stash[IMAGES_STASH_KEY] = [
        pytest.param(image, marks=pytest.mark.uses_image.with_args(image))
        for image in images
    ]
    config.pluginmanager.register(log_sync.LogSyncPlugin())