@staticmethod
def parse_input_params(size=None, error=None):
    '\n    Check if input params are valid and return sample size.\n\n    :param size: an int not smaller than 16, which we would use to estimate\n      number of unique values.\n    :param error: max estimation error, which is a float between 0.01 and 0.50.\n      If error is given, sample size will be calculated from error with\n      _get_sample_size_from_est_error function.\n    :return: sample size\n    :raises:\n      ValueError: If both size and error are given, or neither is given, or\n      values are out of range.\n    '
    if (None not in (size, error)):
        raise ValueError((ApproximateUnique._MULTI_VALUE_ERR_MSG % (size, error)))
    elif ((size is None) and (error is None)):
        raise ValueError(ApproximateUnique._NO_VALUE_ERR_MSG)
    elif (size is not None):
        if ((not isinstance(size, int)) or (size < 16)):
            raise ValueError((ApproximateUnique._INPUT_SIZE_ERR_MSG % size))
        else:
            return size
    elif ((error < 0.01) or (error > 0.5)):
        raise ValueError((ApproximateUnique._INPUT_ERROR_ERR_MSG % error))
    else:
        return ApproximateUnique._get_sample_size_from_est_error(error)
Check if input params are valid and return sample size.

:param size: an int not smaller than 16, which we would use to estimate
  number of unique values.
:param error: max estimation error, which is a float between 0.01 and 0.50.
  If error is given, sample size will be calculated from error with
  _get_sample_size_from_est_error function.
:return: sample size
:raises:
  ValueError: If both size and error are given, or neither is given, or
  values are out of range.
@staticmethod
def parse_input_params(size=None, error=None):
    '\n    Check if input params are valid and return sample size.\n\n    :param size: an int not smaller than 16, which we would use to estimate\n      number of unique values.\n    :param error: max estimation error, which is a float between 0.01 and 0.50.\n      If error is given, sample size will be calculated from error with\n      _get_sample_size_from_est_error function.\n    :return: sample size\n    :raises:\n      ValueError: If both size and error are given, or neither is given, or\n      values are out of range.\n    '
    if (None not in (size, error)):
        raise ValueError((ApproximateUnique._MULTI_VALUE_ERR_MSG % (size, error)))
    elif ((size is None) and (error is None)):
        raise ValueError(ApproximateUnique._NO_VALUE_ERR_MSG)
    elif (size is not None):
        if ((not isinstance(size, int)) or (size < 16)):
            raise ValueError((ApproximateUnique._INPUT_SIZE_ERR_MSG % size))
        else:
            return size
    elif ((error < 0.01) or (error > 0.5)):
        raise ValueError((ApproximateUnique._INPUT_ERROR_ERR_MSG % error))
    else:
        return ApproximateUnique._get_sample_size_from_est_error(error)