import numbers


def _get_n_samples_bootstrap(n_samples, max_samples):
    """
    Get the number of samples in a bootstraping sample

    Parameters
    ----------
    n_samples : 
        Number of samples in the dataset.
    max_samples : 
        The maximum number of samples to draw from the total available samples.

    Returns
    -------

    """
    
    if max_samples is None:
        max_samples = n_samples
        
    if isinstance(max_samples, numbers.Integral):
        return max_samples
    
    if isinstance(max_samples, numbers.Real):
        return int(round(n_samples * max_samples))