

def create_license_file(license_id):
    file = 'LICENSE'
    if (license_id == len(licenses)):
        res_file = resource_string('spark_package.resources', 'LICENSE').decode('utf-8')
    else:
        res_file = resource_string('spark_package.resources.license_temps', licenses[(license_id - 1)][0]).decode('utf-8')
    f = open(file, 'w')
    f.write(res_file)
    f.close()

dataset/ETHPy150Open databricks/spark-package-cmd-tool/python/spark_package/spark_package.py create_license_file/original