code: def getNerfppNorm(cam_info):
      def get_center_and_diag(cam_centers):
          cam_centers = np.hstack(cam_centers)
          avg_cam_center = np.mean(cam_centers, axis=1, keepdims=True)
          center = avg_cam_center
          dist = np.linalg.norm(
              cam_centers - center, axis=0, keepdims=True
          )
          diagonal = np.max(dist)
          return center.flatten(), diagonal
  
      cam_centers = []
  
      for cam in cam_info:
          W2C = getWorld2View2(cam.R, cam.T)
          C2W = np.linalg.inv(W2C)
          cam_centers.append(C2W[:3, 3:4])
  
      center, diagonal = get_center_and_diag(cam_centers)
      radius = diagonal * 1.1
  
      translate = -center
  
      return {"translate": translate, "radius": radius}
  
imports: import os
  import sys
  from PIL import Image
  from typing import NamedTuple
  from scene.colmap_loader import read_extrinsics_text, read_intrinsics_text, qvec2rotmat, read_extrinsics_binary, read_intrinsics_binary, read_points3D_binary, read_points3D_text
  from utils.graphics_utils import getWorld2View2, focal2fov, fov2focal
  import numpy
  import json
  from pathlib import Path
  from plyfile import PlyData, PlyElement
  from utils.sh_utils import SH2RGB
  from scene.gaussian_model import BasicPointCloud
label_desc: Use image node_id 1 for calling a global function with example usage: getNerfppNorm(cam_info) and returns: dict, center,  diagonal