importosfromgroupdocs.viewerimportLicensedefset_license_from_file():license_path=os.path.abspath("./GroupDocs.Viewer.lic")ifnotos.path.exists(license_path):print(f"License file not found at: {license_path}")returnlicense=License()license.set_license(license_path)defset_license_from_stream():license_path=os.path.abspath("./GroupDocs.Viewer.lic")ifnotos.path.exists(license_path):print(f"License file not found at: {license_path}")returnwithopen(license_path,"rb")aslicense_stream:license=License()license.set_license(license_stream)