code: def load_blender_data(
      basedir,
      half_res=False,
      testskip=1,
      debug=False,
      path_manager=None,
      focal_length_in_screen_space=False,
  ):
      splits = ["train", "val", "test"]
      metas = {}
      for s in splits:
          path = os.path.join(basedir, f"transforms_{s}.json")
          with open(_local_path(path_manager, path)) as fp:
              metas[s] = json.load(fp)
  
      all_imgs = []
      all_poses = []
      counts = [0]
      for s in splits:
          meta = metas[s]
          imgs = []
          poses = []
          if s == "train" or testskip == 0:
              skip = 1
          else:
              skip = testskip
  
          for frame in meta["frames"][::skip]:
              fname = os.path.join(basedir, frame["file_path"] + ".png")
              imgs.append(
                  np.array(Image.open(_local_path(path_manager, fname)))
              )
              poses.append(np.array(frame["transform_matrix"]))
          imgs = (np.array(imgs) / 255.0).astype(np.float32)
          poses = np.array(poses).astype(np.float32)
          counts.append(counts[-1] + imgs.shape[0])
          all_imgs.append(imgs)
          all_poses.append(poses)
  
      i_split = [np.arange(counts[i], counts[i + 1]) for i in range(3)]
  
      imgs = np.concatenate(all_imgs, 0)
      poses = np.concatenate(all_poses, 0)
  
      H, W = imgs[0].shape[:2]
      camera_angle_x = float(meta["camera_angle_x"])
      if focal_length_in_screen_space:
          focal = 0.5 * W / np.tan(0.5 * camera_angle_x)
      else:
          focal = 1 / np.tan(0.5 * camera_angle_x)
  
      render_poses = torch.stack(
          [
              torch.from_numpy(pose_spherical(angle, -30.0, 4.0))
              for angle in np.linspace(-180, 180, 40 + 1)[:-1]
          ],
          0,
      )
  
      # In debug mode, return extremely tiny images
      if debug:
          import cv2
  
          H = H // 32
          W = W // 32
          if focal_length_in_screen_space:
              focal = focal / 32.0
          imgs = [
              torch.from_numpy(
                  cv2.resize(
                      imgs[i],
                      dsize=(25, 25),
                      interpolation=cv2.INTER_AREA,
                  )
              )
              for i in range(imgs.shape[0])
          ]
          imgs = torch.stack(imgs, 0)
          poses = torch.from_numpy(poses)
          return imgs, poses, render_poses, [H, W, focal], i_split
  
      if half_res:
          import cv2
  
          # TODO: resize images using INTER_AREA (cv2)
          H = H // 2
          W = W // 2
          if focal_length_in_screen_space:
              focal = focal / 2.0
          imgs = [
              torch.from_numpy(
                  cv2.resize(
                      imgs[i],
                      dsize=(400, 400),
                      interpolation=cv2.INTER_AREA,
                  )
              )
              for i in range(imgs.shape[0])
          ]
          imgs = torch.stack(imgs, 0)
  
      poses = torch.from_numpy(poses)
  
      return imgs, poses, render_poses, [H, W, focal], i_split
  
file_path: pytorch3d/pytorch3d/implicitron/dataset/load_blender.py
imports: import json
  import os
  import numpy
  import torch
  from PIL import Image
label_desc: Use image node_id 6 for calling a global function with example usage: load_blender_data(basedir, half_res, testskip, debug, path_manager, focal_length_in_screen_space) and returns: imgs,  poses,  render_poses,  list,  i_split, imgs,  poses,  render_poses,  list,  i_split