code: def transform_mat(R, t):
      """Creates a batch of transformation matrices
      Args:
          - R: Bx3x3 array of a batch of rotation matrices
          - t: Bx3x1 array of a batch of translation vectors
      Returns:
          - T: Bx4x4 Transformation matrix
      """
      # No padding left or right, only add an extra row
      return torch.cat(
          [F.pad(R, [0, 0, 0, 1]), F.pad(t, [0, 0, 0, 1], value=1)],
          dim=2,
      )
  
imports: from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import division
  import os.path
  import pickle
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 9 for calling a global function with example usage: transform_mat(R, t) and returns: torch