def METHOD_NAME(self):
    r"""Processes the timeout variable, and checks whether it is valid.
    Returns
    -------
    float
        A timeout value.
    """
    timeout = self.var.get('timeout', default='infinite')
    if timeout == 'infinite':
        return
    try:
        timeout = int(timeout)
        assert(timeout >= 0)
    except Exception:
        raise InvalidValue(f'"{timeout}" is not a valid timeout. '
                           f'Expecting a positive integer or "infinite".')
    return timeout