code: def _interpret_blender_cameras(
      poses: torch.Tensor, focal: float
  ) -> List[PerspectiveCameras]:
      """
      Convert 4x4 matrices representing cameras in blender format
      to PyTorch3D format.
  
      Args:
          poses: N x 3 x 4 camera matrices
          focal: ndc space focal length
      """
      pose_target_cameras = []
      for pose_target in poses:
          pose_target = pose_target[:3, :4]
          mtx = torch.eye(4, dtype=pose_target.dtype)
          mtx[:3, :3] = pose_target[:3, :3].t()
          mtx[3, :3] = pose_target[:, 3]
          mtx = mtx.inverse()
  
          # flip the XZ coordinates.
          mtx[:, [0, 2]] *= -1.0
  
          Rpt3, Tpt3 = mtx[:, :3].split([3, 1], dim=0)
  
          focal_length_pt3 = torch.FloatTensor([[focal, focal]])
          principal_point_pt3 = torch.FloatTensor([[0.0, 0.0]])
  
          cameras = PerspectiveCameras(
              focal_length=focal_length_pt3,
              principal_point=principal_point_pt3,
              R=Rpt3[None],
              T=Tpt3,
          )
          pose_target_cameras.append(cameras)
      return pose_target_cameras
  
imports: from dataclasses import field
  from typing import Iterable, Iterator, List, Optional, Sequence, Tuple
  import numpy
  import torch
  from pytorch3d.implicitron.tools.config import Configurable, expand_args_fields, run_auto_creation
  from pytorch3d.renderer import CamerasBase, join_cameras_as_batch, PerspectiveCameras
  from .dataset_base import DatasetBase
  from .dataset_map_provider import DatasetMap, DatasetMapProviderBase, PathManagerFactory
  from .frame_data import FrameData
  from .utils import DATASET_TYPE_KNOWN, DATASET_TYPE_UNKNOWN
label_desc: Use image node_id 1 for calling a global function with example usage: _interpret_blender_cameras(poses, focal) and returns: pose_target_cameras