code: def version_from_branch(branch):
      
      try:
          return tuple(
              map(
                  int,
                  re.match(r"^.*(?P<version>\d+(\.\d+)+).*$", branch)
                  .groupdict()["version"]
                  .split("."),
              )
          )
      except AttributeError as attr_err:
          raise ValueError(
              f"Branch {branch} seems to not have a version in its name."
          ) from attr_err
docs: return version information from a git branch name