def METHOD_NAME(self, metrics: Dict[str, float], step: Optional[int] = None):
    assert rank_zero_only.rank == 0, 'experiment tried to log from global_rank != 0'
    metric_items: Dict[str:Any] = {k: v for k, v in metrics.items()}
    if 'epoch' in metric_items:
        epoch: int = metric_items.pop('epoch')
    else:
        epoch = None
    for k, v in metric_items.items():
        name = k
        context = {}
        if self._train_metric_prefix and name.startswith(self._train_metric_prefix):
            name = name[len(self._train_metric_prefix):]
            context['subset'] = 'train'
        elif self._test_metric_prefix and name.startswith(self._test_metric_prefix):
            name = name[len(self._test_metric_prefix):]
            context['subset'] = 'test'
        elif self._val_metric_prefix and name.startswith(self._val_metric_prefix):
            name = name[len(self._val_metric_prefix):]
            context['subset'] = 'val'
        self.experiment.track(v, name=name, step=step, epoch=epoch, context=context)