code: def face_normals(
      faces: type_alias.TensorLike,
      clockwise: bool = True,
      normalize: bool = True,
      name: str = "normals_face_normals",
  ) -> type_alias.TensorLike:
      """Computes face normals for meshes.
  
      This function supports planar convex polygon faces. Note that for
      non-triangular faces, this function uses the first 3 vertices of each
      face to calculate the face normal.
  
      Note:
        In the following, A1 to An are optional batch dimensions.
  
      Args:
        faces: A tensor of shape `[A1, ..., An, M, 3]`, which stores vertices
          positions of each face, where M is the number of vertices of each face.
          The rank of this tensor should be at least 2.
        clockwise: Winding order to determine front-facing faces. The order of
          vertices should be either clockwise or counterclockwise.
        normalize: A `bool` defining whether output normals are normalized.
        name: A name for this op. Defaults to "normals_face_normals".
  
      Returns:
        A tensor of shape `[A1, ..., An, 3]` containing the face normals.
  
      Raises:
        ValueError: If the shape of `vertices`, `faces` is not supported.
      """
      with tf.name_scope(name):
          faces = tf.convert_to_tensor(value=faces)
  
          shape.check_static(
              tensor=faces,
              tensor_name="faces",
              has_rank_greater_than=1,
              has_dim_equals=(-1, 3),
              has_dim_greater_than=(-2, 2),
          )
  
          vertices = tf.unstack(faces, axis=-2)
          vertices = vertices[:3]
          return triangle.normal(
              *vertices, clockwise=clockwise, normalize=normalize
          )
  
file_path: graphics/tensorflow_graphics/geometry/representation/mesh/normals.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from six.moves import range
  import tensorflow
  from tensorflow_graphics.geometry.representation import triangle
  from tensorflow_graphics.util import export_api
  from tensorflow_graphics.util import safe_ops
  from tensorflow_graphics.util import shape
  from tensorflow_graphics.util import type_alias
label_desc: Use image node_id 2 for calling a global function with example usage: face_normals(faces, clockwise, normalize, name) and returns: triangle