code: def perspective_correct_interpolation(
      triangle_vertices_model_space: type_alias.TensorLike,
      attribute: type_alias.TensorLike,
      pixel_position: type_alias.TensorLike,
      model_to_eye_matrix: type_alias.TensorLike,
      perspective_matrix: type_alias.TensorLike,
      screen_dimensions: type_alias.TensorLike,
      lower_left_corner: type_alias.TensorLike = (0.0, 0.0),
      name: str = "perspective_correct_interpolation",
  ) -> tf.Tensor:
      """Returns perspective corrected interpolation of attributes over triangles.
  
      Note:
        In the following, A1 to An are optional batch dimensions.
  
      Args:
        triangle_vertices_model_space: A tensor of shape `[A1, ..., An, 3, 3]`,
          where the last dimension represents the vertices of a triangle in model
          space.
        attribute: A tensor of shape `[A1, ..., An, 3, B]`, where the last dimension
          stores a per-vertex `B`-dimensional attribute.
        pixel_position: A tensor of shape `[A1, ..., An, 2]`, where the last
          dimension stores the position (in pixels) where the interpolation is
          requested.
        model_to_eye_matrix: A tensor of shape `[A1, ..., An, 4, 4]`, where the last
          two dimension represent matrices to transform points from model to eye
          coordinates.
        perspective_matrix: A tensor of shape `[A1, ..., An, 4, 4]`, where the last
          two dimension represent matrices to transform points from eye to clip
          coordinates.
        screen_dimensions: A tensor of shape `[A1, ..., An, 2]`, where the last
          dimension is expressed in pixels and captures the width and the height (in
          pixels) of the screen.
        lower_left_corner: A tensor of shape `[A1, ..., An, 2]`, where the last
          dimension captures the position (in pixels) of the lower left corner of
          the screen.
        name: A name for this op. Defaults to "perspective_correct_interpolation".
  
      Raises:
        tf.errors.InvalidArgumentError: if any input contains data not in the
          specified range of valid values.
        ValueError: If any input is of an unsupported shape.
  
      Returns:
        A tensor of shape `[A1, ..., An, B]`, containing interpolated attributes.
      """
      with tf.name_scope(name):
          barycentric = perspective_correct_barycentrics(
              triangle_vertices_model_space,
              pixel_position,
              model_to_eye_matrix,
              perspective_matrix,
              screen_dimensions,
              lower_left_corner,
          )
          return interpolate_attributes(attribute, barycentric)
  
file_path: graphics/tensorflow_graphics/rendering/opengl/math.py
imports: from typing import Tuple
  import tensorflow
  from tensorflow_graphics.geometry.transformation import look_at
  from tensorflow_graphics.math.interpolation import weighted
  from tensorflow_graphics.rendering.camera import perspective
  from tensorflow_graphics.util import asserts
  from tensorflow_graphics.util import export_api
  from tensorflow_graphics.util import shape
  from tensorflow_graphics.util import type_alias
label_desc: Use image node_id 8 for calling a global function with example usage: perspective_correct_interpolation(triangle_vertices_model_space, attribute, pixel_position, model_to_eye_matrix, perspective_matrix, screen_dimensions, lower_left_corner, name) and returns: interpolate_attributes