code: def flatten_nvs_results(results) -> Dict[str, Any]:
      """
      Takes input `results` list of dicts of the form::
  
          [
              {
                  'subset':'train/test/...',
                  'subsubset': 'src=1/src=2/...',
                  'metrics': nvs_eval_metrics}
              },
              ...
          ]
  
      And converts to a flat dict as follows::
  
          {
              'subset=train/test/...|subsubset=src=1/src=2/...': nvs_eval_metrics,
              ...
          }
      """
      results_flat = {}
      for result in results:
          for metric_name, metric_val in result["metrics"].items():
              metric_key = _get_flat_nvs_metric_key(result, metric_name)
              assert metric_key not in results_flat
              results_flat[metric_key] = metric_val
      return results_flat
  
imports: import copy
  import warnings
  from collections import OrderedDict
  from dataclasses import dataclass, field
  from typing import Any, Dict, List, Optional, Sequence, Tuple, TYPE_CHECKING, Union
  import numpy
  import torch
  import torch.nn.functional
  from pytorch3d.implicitron.dataset.frame_data import FrameData
  from pytorch3d.implicitron.dataset.utils import is_train_frame
  from pytorch3d.implicitron.models.base_model import ImplicitronRender
  from pytorch3d.implicitron.tools import vis_utils
  from pytorch3d.implicitron.tools.image_utils import mask_background
  from pytorch3d.implicitron.tools.metric_utils import calc_psnr, eval_depth, iou, rgb_l1
  from pytorch3d.implicitron.tools.point_cloud_utils import get_rgbd_point_cloud
  from pytorch3d.implicitron.tools.vis_utils import make_depth_image
  from pytorch3d.renderer.cameras import PerspectiveCameras
  from pytorch3d.vis.plotly_vis import plot_scene
  from tabulate import tabulate
label_desc: Use image node_id 7 for calling a global function with example usage: flatten_nvs_results(results) and returns: results_flat