@staticmethod
def _expand_version(version, default):
    """ Ensure a version number is a 3-tuple. """
    if not isinstance(version, tuple):
        version = version,
    default = default,
    while len(version) < 3:
        version += default
    return version
