def METHOD_NAME(id, file):
    """Upload files to data"""
    api = rest.DataApi(configuration.get_api_client())
    result = api.list_data_files(id)
    check_upload_files(len(result) + len(file))
    do_upload_files(api, id, file)