def timing_metrics(
    *, minibatch=False, epoch=False, epoch_running=False, experience=False, stream=False
) -> List[TimePluginMetric]:
    """
    Helper method that can be used to obtain the desired set of
    plugin metrics.

    :param minibatch: If True, will return a metric able to log the train
        minibatch elapsed time.
    :param epoch: If True, will return a metric able to log the train epoch
        elapsed time.
    :param epoch_running: If True, will return a metric able to log the running
        train epoch elapsed time.
    :param experience: If True, will return a metric able to log the eval
        experience elapsed time.
    :param stream: If True, will return a metric able to log the eval stream
        elapsed time.

    :return: A list of plugin metrics.
    """

    metrics: List[TimePluginMetric] = []
    if minibatch:
        metrics.append(MinibatchTime())

    if epoch:
        metrics.append(EpochTime())

    if epoch_running:
        metrics.append(RunningEpochTime())

    if experience:
        metrics.append(ExperienceTime())

    if stream:
        metrics.append(StreamTime())

    return metrics

    Helper method that can be used to obtain the desired set of
    plugin metrics.

    :param minibatch: If True, will return a metric able to log the train
        minibatch elapsed time.
    :param epoch: If True, will return a metric able to log the train epoch
        elapsed time.
    :param epoch_running: If True, will return a metric able to log the running
        train epoch elapsed time.
    :param experience: If True, will return a metric able to log the eval
        experience elapsed time.
    :param stream: If True, will return a metric able to log the eval stream
        elapsed time.

    :return: A list of plugin metrics.
    
avalanche/evaluation/metrics/timing.py