code: def get_samples_losses(samples_plus_losses):
      def _get_info(sample):
          d = {k: v for k, v in sample.losses.items() if "loss" in k}
          d["filepath"] = sample.filepath
          return d
  
      return [_get_info(l) for l in samples_plus_losses]
  
file_path: icevision/icevision/models/interpretation.py
imports: from icevision.imports import *
  from icevision.utils import *
  from icevision.core import *
  from icevision.data import *
  from icevision.visualize.show_data import show_preds
  from icevision.core.record_components import LossesRecordComponent
label_desc: Use image node_id 7 for calling a global function with example usage: get_samples_losses(samples_plus_losses) and returns: unknown, d