def parse_timeout(timeout):
    """Returns a tuple of timeout consist of connect timeout and 
    read timeout.

    :param proxies: float or tuple
    :rtype: tuple
    """
    if isinstance(timeout, tuple):
        try:
            c, r = timeout
        except ValueError as e:
            # this may raise a string formatting error.
            err = ("Invalid timeout {0}. Pass a (connect, read) "
                   "timeout tuple, or a single float to set "
                   "both timeouts to the same value".format(timeout))
            raise ValueError(err)
    else:
        c, r = timeout, timeout
    return c, r