code: def sampling_points_from_frustum(
      height,
      width,
      focal,
      principal_point,
      depth_min=0.0,
      depth_max=5.0,
      frustum_size=(256, 256, 256),
  ):
      """Generates samples from a camera frustum."""
  
      # ------------------ Get the rays from the camera ----------------------------
      sampling_points = grid.generate(
          (0.0, 0.0),
          (float(width) - 1, float(height) - 1),
          (frustum_size[0], frustum_size[1]),
      )
      sampling_points = tf.reshape(sampling_points, [-1, 2])  # [h*w, 2]
      rays = perspective.ray(
          sampling_points, focal, principal_point
      )  # [h*w, 3]
  
      # ------------------ Extract a volume in front of the camera -----------------
      depth_tensor = grid.generate(
          (depth_min,), (depth_max,), (frustum_size[2],)
      )
      sampling_volume = tf.multiply(
          tf.expand_dims(rays, axis=-1), tf.transpose(depth_tensor)
      )  # [h*w, 3, dstep]
      sampling_volume = tf.transpose(
          sampling_volume, [0, 2, 1]
      )  # [h*w, dstep, 3]
      sampling_volume = tf.reshape(
          sampling_volume, [-1, 3]
      )  # [h*w*dstep, 3]
      return sampling_volume
  
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 4 for calling a global function with example usage: sampling_points_from_frustum(height, width, focal, principal_point, depth_min, depth_max, frustum_size) and returns: sampling_volume