code: def split_penn_fudan(
      n_experiences: int,
      train_transform=None,
      eval_transform=None,
      shuffle=True,
      root_path: Union[str, Path] = None,
  ):
      """
      Creates an example benchmark based on the Penn-Fudan Pedestrian dataset.
  
      This is a toy benchmark created only to show how a detection benchmark can
      be created. It was not meant to be used for research purposes!
  
      :param n_experiences: The number of train experiences to create.
      :param train_transform: The train transformation.
      :param eval_transform: The eval transformation.
      :param shuffle: If True, the dataset will be split randomly
      :param root_path: The root path of the dataset. Defaults to None,
          which means that the default path will be used.
      :return: A :class:`DetectionScenario` instance.
      """
  
      dataset = PennFudanDataset(root=root_path)
      # The test size of 50 is used here:
      # https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html
      test_size = 50
      train_size = len(dataset) - test_size
      if shuffle:
          train_dataset, test_dataset = random_split(
              dataset, [train_size, test_size]
          )
      else:
          indices = list(range(len(dataset)))
          train_dataset = Subset(dataset, indices[:-test_size])
          test_dataset = Subset(dataset, indices[-test_size:])
  
      return split_detection_benchmark(
          n_experiences=n_experiences,
          train_dataset=train_dataset,
          test_dataset=test_dataset,
          n_classes=1,  # There is only one class: pedestrian
          train_transform=train_transform,
          eval_transform=eval_transform,
          shuffle=shuffle,
      )
  
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 3 for calling a global function with example usage: split_penn_fudan(n_experiences, train_transform, eval_transform, shuffle, root_path) and returns: split_detection_benchmark