code: def make_penn_fudan_metrics(detection_only=True):
      """
      Initialize the evaluator for the Penn-Fudan dataset.
  
      This uses the default evaluator (COCO API (pycocotools)).
  
      :param detection_only: If True, consider only the detection task.
  
      :return: The detection metrics for the Penn-Fudan dataset.
      """
  
      if detection_only:
          iou_types = ["bbox"]
      else:
          iou_types = ["bbox", "segm"]
  
      return DetectionMetrics(
          iou_types=iou_types,
          default_to_coco=True,
          summarize_to_stdout=True,
      )
  
imports: import argparse
  from packaging.version import parse
  import torch
  import torchvision
  import logging
  from pathlib import Path
  from typing import Union
  from torch.utils.data import random_split, Subset
  from torchvision.models.detection.mask_rcnn import MaskRCNNPredictor
  from avalanche.benchmarks.datasets import PennFudanDataset
  from avalanche.training.supervised.naive_object_detection import ObjectDetectionTemplate
  from avalanche.evaluation.metrics import timing_metrics, loss_metrics
  from avalanche.evaluation.metrics.detection import DetectionMetrics
  from avalanche.logging import InteractiveLogger
  from avalanche.training.plugins import LRSchedulerPlugin, EvaluationPlugin
  from torchvision.transforms import ToTensor
  from torchvision.models.detection.faster_rcnn import FastRCNNPredictor
  from examples.detection_examples_utils import split_detection_benchmark
label_desc: Use image node_id 4 for calling a global function with example usage: make_penn_fudan_metrics(detection_only) and returns: DetectionMetrics