    except subprocess.CalledProcessError:  # Not on a branch, fallback
      return run_cmd_default(["git", "config", "--get", "remote.origin.url"], default=default)
  
  
  with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "common", "version.h")) as _versionf:
    version = _versionf.read().split('"')[1]
  
  prebuilt = os.path.exists(os.path.join(BASEDIR, 'prebuilt'))
  
  training_version: bytes = b"0.2.0"
  terms_version: bytes = b"2"
 
</s> remove from selfdrive.version import dirty, origin, branch, commit
 </s> add from selfdrive.version import dirty, origin, branch, commit, get_version, get_git_remote, get_git_branch, get_git_commit
def get_version():
  with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "common", "version.h")) as _versionf:
    version = _versionf.read().split('"')[1]
  return version
    except subprocess.CalledProcessError:  # Not on a branch, fallback
      return run_cmd_default(["git", "config", "--get", "remote.origin.url"], default=default)
  
  
def get_version():
  with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "common", "version.h")) as _versionf:
    version = _versionf.read().split('"')[1]
  return version
def get_version():
  with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "common", "version.h")) as _versionf:
    version = _versionf.read().split('"')[1]
  return version
  
  prebuilt = os.path.exists(os.path.join(BASEDIR, 'prebuilt'))
  
  training_version: bytes = b"0.2.0"
  terms_version: bytes = b"2"
keep keep keep keep replace replace keep keep keep keep keep
 athena: version endpoint (#21045)

* athena: version endpoint

* get_version function

* more explicit version validation 
selfdrive/version.py