code: def _points_from_z_values(
      ray_org: TensorLike, ray_dir: TensorLike, z_values: TensorLike
  ) -> tf.Tensor:
      """Sample points on rays given the z values (distances along the rays).
  
      Args:
        ray_org: A tensor of shape `[A1, ..., An, 3]`,
          where the last dimension represents the 3D position of the ray origin.
        ray_dir: A tensor of shape `[A1, ..., An, 3]`,
          where the last dimension represents the 3D direction of the ray.
        z_values: A tensor of shape `[A1, ..., An, M]` containing the 1D position of
          M points along the ray.
  
      Returns:
        A tensor of shape `[A1, ..., An, M, 3]`
      """
      shape.check_static(
          tensor=ray_dir, tensor_name="ray_dir", has_dim_equals=(-1, 3)
      )
      shape.check_static(
          tensor=ray_org, tensor_name="ray_org", has_dim_equals=(-1, 3)
      )
      shape.compare_batch_dimensions(
          tensors=(ray_org, ray_dir, z_values),
          tensor_names=("ray_org", "ray_dir", "z_values"),
          last_axes=-2,
          broadcast_compatible=False,
      )
  
      points3d = tf.expand_dims(ray_dir, axis=-2) * tf.expand_dims(
          z_values, axis=-1
      )
      points3d = tf.expand_dims(ray_org, -2) + points3d
      return points3d
  
file_path: graphics/tensorflow_graphics/geometry/representation/ray.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Tuple, Union
  from six.moves import range
  import tensorflow
  from tensorflow_graphics.math import sampling
  from tensorflow_graphics.math import vector
  from tensorflow_graphics.util import asserts
  from tensorflow_graphics.util import export_api
  from tensorflow_graphics.util import shape
  from tensorflow_graphics.util.type_alias import TensorLike
label_desc: Use image node_id 1 for calling a global function with example usage: _points_from_z_values(ray_org, ray_dir, z_values) and returns: points3d