def CheckUpToDateVersion(self):
    """Checks if the sphinx-apidoc version is up to date.

    Returns:
      A boolean indicating the version is up to date.
    """
    exit_code, output, _ = self.RunCommand(u'sphinx-apidoc --version')
    if exit_code != 0:
      return False

    version_tuple = (0, 0, 0)
    for line in output.split(b'\n'):
      if line.startswith(b'Sphinx (sphinx-apidoc) '):
        _, _, version = line.rpartition(b' ')

        version_tuple = tuple([int(digit) for digit in version.split(b'.')])

    return version_tuple >= self._MINIMUM_VERSION_TUPLE
dataset/ETHPy150Open log2timeline/dfvfs/utils/review.py/SphinxAPIDocHelper.CheckUpToDateVersion/original