def model_eval(model, b_gen, metric_str, workers=4):
    """
    Evaluate model on data generator.
    Prints and returns scores for specified metrics.

    Parameters
    ----------
    model : Keras model
        The model to evaluate.
    b_gen : DataGenerator object
        DataGenerator object to use for loading the data.
    metric_str : list of str 
        List of names of the metrics to evaluate. For printing.
    workers : int, optional
        Number of workers for the multiprocessing functionalities of
        the Keras model methods. Defauts to 4.
        
    Returns
    -------
    score : ndarray
        Array containing results of the evaluated metrics as returned
        by Keras model.evaluate() methods.
    """
    
    print('\nModel Evaluation: \n')
    score = model.evaluate_generator(b_gen, verbose=1,
                                     use_multiprocessing=True,
                                     workers=workers)
    for i, m in enumerate(metric_str):
        print('Test '+m+':', score[i])
    return score