code: def get_optical_pose_base(pinholes: Tensor) -> Tensor:
      """Compute extrinsic transformation matrices for pinholes.
  
      Args:
          pinholes: tensor of form [fx fy cx cy h w rx ry rz tx ty tz]
                             of size (N, 12).
  
      Returns:
          tensor of extrinsic transformation matrices of size (N, 4, 4).
      """
      if not (len(pinholes.shape) == 2 and pinholes.shape[1] == 12):
          raise AssertionError(pinholes.shape)
      # TODO: where is rtvec_to_pose?
      raise NotImplementedError
  
imports: from typing import Iterable, List, Union
  import torch
  from kornia.core import Device, Tensor, eye, stack, zeros
  from kornia.core.check import KORNIA_CHECK_SAME_DEVICE
  from kornia.geometry.conversions import convert_points_from_homogeneous, convert_points_to_homogeneous
  from kornia.geometry.linalg import inverse_transformation, transform_points
  from kornia.utils.helpers import _torch_inverse_cast
label_desc: Use image node_id 4 for calling a global function with example usage: get_optical_pose_base(pinholes) without return types