code: def _create_extrinsics_with_rotation(
      self, batch_size, alpha, beta, gamma, tx, ty, tz, device, dtype
  ):
      Rx = torch.eye(3, device=device, dtype=dtype)
      Rx[1, 1] = math.cos(alpha)
      Rx[1, 2] = math.sin(alpha)
      Rx[2, 1] = -Rx[1, 2]
      Rx[2, 2] = Rx[1, 1]
  
      Ry = torch.eye(3, device=device, dtype=dtype)
      Ry[0, 0] = math.cos(beta)
      Ry[0, 2] = -math.sin(beta)
      Ry[2, 0] = -Ry[0, 2]
      Ry[2, 2] = Ry[0, 0]
  
      Rz = torch.eye(3, device=device, dtype=dtype)
      Rz[0, 0] = math.cos(gamma)
      Rz[0, 1] = math.sin(gamma)
      Rz[1, 0] = -Rz[0, 1]
      Rz[1, 1] = Rz[0, 0]
  
      Ryz = torch.matmul(Ry, Rz)
      R = torch.matmul(Rx, Ryz)
  
      extrinsics = torch.eye(4, device=device, dtype=dtype)
      extrinsics[..., 0, -1] = tx
      extrinsics[..., 1, -1] = ty
      extrinsics[..., 2, -1] = tz
      extrinsics[:3, :3] = R
  
      return extrinsics.expand(batch_size, -1, -1)
  
imports: import math
  import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia
  from kornia.testing import assert_close, tensor_to_gradcheck_var
label_desc: Use image node_id 3 for calling the TestPinholeCamera obj's underlying member method code with example usage: obj._create_extrinsics_with_rotation(batch_size, alpha, beta, gamma, tx, ty, tz, device, dtype) and returns: extrinsics