code: def transform_points(points, transform):
      """Transform points.
  
      Args:
        points: tf.Tensor, [batch_size, n_parts, n_points, n_dims], input points.
        transform: [batch_size, n_parts, transform_dims], transforming matices.
  
      Returns:
        points: tf.Tensor, [batch_size, n_parts, n_points, n_dims], output points.
      """
      batch_size = points.shape[0]
      n_parts = points.shape[1]
      n_points = tf.shape(points)[2]
      n_dims = points.shape[-1]
      ones = tf.ones_like(points[..., :1])
      points = tf.concat((points, ones), axis=-1)
      points = tf.reshape(
          points, (batch_size, n_parts, n_points, -1, 1)
      )
      transform = tf.reshape(
          transform, (batch_size, n_parts, 1, n_dims + 1, n_dims + 1)
      )
      transform = tf.tile(transform, (1, 1, n_points, 1, 1))
      points = tf.matmul(transform, points)
      points = tf.squeeze(points, axis=-1)[..., :n_dims]
      return points
  
file_path: graphics/tensorflow_graphics/projects/nasa/lib/model_utils.py
imports: import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling a global function with example usage: transform_points(points, transform) and returns: points