def check_min_sample_periods(X, time_column, min_sample_periods):
    """
    Check if all periods contained in a dataframe for a certain time_column
    contain at least min_sample_periods examples.
    """
    return (X[time_column].value_counts() >= min_sample_periods).prod()