code: def object_to_world(
      voxels,
      euler_angles_x,
      euler_angles_y,
      translation_vector,
      target_volume_size=(128, 128, 128),
  ):
      """Apply the transformations to the voxels and place them in world coords."""
      scale_factor = 1.82  # object to world voxel space scale factor
  
      translation_vector = tf.expand_dims(translation_vector, axis=-1)
  
      sampling_points = tf.cast(
          sampling_points_from_3d_grid(target_volume_size), tf.float32
      )  # 128^3 X 3
      transf_matrix_x = rotation_matrix_3d.from_euler(
          euler_angles_x
      )  # [B, 3, 3]
      transf_matrix_y = rotation_matrix_3d.from_euler(
          euler_angles_y
      )  # [B, 3, 3]
      transf_matrix = tf.matmul(
          transf_matrix_x, transf_matrix_y
      )  # [B, 3, 3]
      transf_matrix = transf_matrix * scale_factor  # [B, 3, 3]
      sampling_points = tf.matmul(
          transf_matrix, tf.transpose(sampling_points)
      )  # [B, 3, N]
      translation_vector = tf.matmul(
          transf_matrix, translation_vector
      )  # [B, 3, 1]
      sampling_points = sampling_points - translation_vector
      sampling_points = tf.linalg.matrix_transpose(sampling_points)
      sampling_points = sampling_points_to_voxel_index(
          sampling_points, target_volume_size
      )
      sampling_points = tf.cast(sampling_points, tf.float32)
      interpolated_points = trilinear.interpolate(
          voxels, sampling_points
      )
      interpolated_voxels = tf.reshape(
          interpolated_points, [-1] + list(target_volume_size) + [4]
      )
  
      return interpolated_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 9 for calling a global function with example usage: object_to_world(voxels, euler_angles_x, euler_angles_y, translation_vector, target_volume_size) and returns: interpolated_voxels