def METHOD_NAME(session, config, items):
    # Add test configuration as metadata (environment table)
    config._metadata = configuration
    # Add each test_case metadata as user_properties for its item
    for item in items:
        item.user_properties.extend([(key, value) for key, value in item.callspec.params['test_case'].items()])