docs: def replace_version_string(content, variable, new_version):
      """
      Given the content of a file, finds the version string and updates it.
  
      :param content: The file contents
      :param variable: The version variable name as a string
      :param new_version: The new version number as a string
      :return: A string with the updated version number
      """
      return re.sub(
          r'({0} ?= ?["\'])\d+\.\d+(?:\.\d+)?(["\'])'.format(variable),
          r'\g<1>{0}\g<2>'.format(new_version),
          content
      )