defget_code_version()->str:version="N/A"try:version=os.environ["CODE_VERSION"]exceptKeyError:try:version=Version.from_git().serialize(dirty=True,style=Style.SemVer)exceptRuntimeError:logger.warning("Could not get code_version from either the 'CODE_VERSION' environment"" variable nor from git history. The 'code_version' global attribute"" will be set to 'N/A'.",)returnversion