@staticmethod
def _validate_metrics(input_metrics):
    if (not hasattr(input_metrics, '__len__')):
        raise ValueError('metrics have to be an array but {}'.format(type(input_metrics)))
    valid_metrics = []
    for metric in input_metrics:
        if (isinstance(metric, RatingMetric) or isinstance(metric, RankingMetric)):
            valid_metrics.append(metric)
    return valid_metrics
@staticmethod
def _validate_metrics(input_metrics):
    if (not hasattr(input_metrics, '__len__')):
        raise ValueError('metrics have to be an array but {}'.format(type(input_metrics)))
    valid_metrics = []
    for metric in input_metrics:
        if (isinstance(metric, RatingMetric) or isinstance(metric, RankingMetric)):
            valid_metrics.append(metric)
    return valid_metrics