def METHOD_NAME(epochs: List, filteroptions: dict) -> List:
    if filteroptions['filter_min_trades'] > 0:
        epochs = _hyperopt_filter_epochs_trade(epochs, filteroptions['filter_min_trades'])
    if filteroptions['filter_max_trades'] > 0:
        epochs = [
            x for x in epochs
            if x['results_metrics'].get('total_trades') < filteroptions['filter_max_trades']
        ]
    return epochs