code: def get_device_run_durations(
      function_event: profiler_util.FunctionEvent,
  ) -> Tuple[float, float]:
      """Get CPU and CUDA run durations for an event.
  
      :param function_event: a function event instance.
      """
      torch_cpu_time = get_torch_op_time(
          function_event.cpu_children, "cpu_time_total"
      )
      torch_cuda_time = get_torch_op_time(
          function_event.cpu_children, "cuda_time_total"
      )
      return torch_cpu_time, torch_cuda_time
  
file_path: ludwig/ludwig/benchmarking/reporting.py
imports: from collections import Counter, defaultdict
  from statistics import mean
  from typing import Any, Dict, List, Tuple, Union
  import torch
  from torch._C._autograd import _KinetoEvent
  from torch.autograd import DeviceType, profiler_util
  from ludwig.benchmarking.profiler_dataclasses import DeviceUsageMetrics, SystemResourceMetrics, TorchProfilerMetrics
  from ludwig.constants import LUDWIG_TAG
label_desc: Use image node_id 5 for calling a global function with example usage: get_device_run_durations(function_event) and returns: torch_cpu_time,  torch_cuda_time