def _check(info):
    """Validate a version info.

    :param info: could be a string, an integer, float, or any integer
           collection (only first three valid integers are used).

    :returns: a valid tuple or an error if invalid.

    """
    from collections import Iterable
    from distutils.version import LooseVersion, StrictVersion
    MAX_COUNT = 3
    if isinstance(info, (int, float)):
        aux = str(info)
    elif isinstance(info, Iterable) and not isinstance(info, str):
        aux = '.'.join(map(str, info))
    else:
        aux = info
    if isinstance(aux, str):
        try:
            essay = StrictVersion(aux)
        except (TypeError, ValueError):
            essay = LooseVersion(aux)
        res = essay.version[:MAX_COUNT]
        if any(res):
            return tuple(res)
        else:
            raise ValueError("invalid version value '{}'".format(info))
    else:
        msg = "Invalid type '{}' for version '{}'"
        raise TypeError(msg.format(type(info).__name__, info))
