code: def transform_volume(
      voxels, transformation_matrix, voxel_size=(128, 128, 128)
  ):
      """Apply a transformation to the input voxels."""
      voxels = tf.convert_to_tensor(voxels)
      volume_sampling = sampling_points_from_3d_grid(voxel_size)
      volume_sampling = tf.matmul(
          transformation_matrix, tf.transpose(a=volume_sampling)
      )
      volume_sampling = tf.cast(
          tf.linalg.matrix_transpose(volume_sampling), tf.float32
      )
      volume_sampling = sampling_points_to_voxel_index(
          volume_sampling, voxel_size
      )
      interpolated_voxels = trilinear.interpolate(
          voxels, volume_sampling
      )
      return tf.reshape(interpolated_voxels, tf.shape(voxels))
  
file_path: graphics/tensorflow_graphics/projects/neural_voxel_renderer/helpers.py
imports: import numpy
  import tensorflow
  from tensorflow_graphics.geometry.representation import grid
  from tensorflow_graphics.geometry.transformation import rotation_matrix_3d
  from tensorflow_graphics.math.interpolation import trilinear
  from tensorflow_graphics.rendering.camera import perspective
  from tensorflow_graphics.rendering.volumetric import emission_absorption
label_desc: Use image node_id 6 for calling a global function with example usage: transform_volume(voxels, transformation_matrix, voxel_size) and returns: tf