code: def _apply_pcl_transformation(X, R, T, s=None):
      """
      Apply a batch of similarity/rigid transformations, parametrized with
      rotation `R`, translation `T` and scale `s`, to an input batch of
      point clouds `X`.
      """
      if isinstance(X, Pointclouds):
          num_points = X.num_points_per_cloud()
          X_t = X.points_padded()
      else:
          X_t = X
  
      if s is not None:
          X_t = s[:, None, None] * X_t
  
      X_t = torch.bmm(X_t, R) + T[:, None, :]
  
      if isinstance(X, Pointclouds):
          X_list = [x[:n_p] for x, n_p in zip(X_t, num_points)]
          X_t = Pointclouds(X_list)
  
      return X_t
  
imports: import unittest
  import numpy
  import torch
  from pytorch3d.ops import points_alignment
  from pytorch3d.structures.pointclouds import Pointclouds
  from pytorch3d.transforms import rotation_conversions
  from .common_testing import get_tests_dir, TestCaseMixin
label_desc: Use image node_id 1 for calling a global function with example usage: _apply_pcl_transformation(X, R, T, s) and returns: X_t