code: def _save_off(
      file,
      *,
      verts: torch.Tensor,
      verts_colors: Optional[torch.Tensor] = None,
      faces: Optional[torch.LongTensor] = None,
      faces_colors: Optional[torch.Tensor] = None,
      decimal_places: Optional[int] = None,
      path_manager: PathManager,
  ) -> None:
      """
      Save a mesh to an ascii .off file.
  
      Args:
          file: File (or path) to which the mesh should be written.
          verts: FloatTensor of shape (V, 3) giving vertex coordinates.
          verts_colors: FloatTensor of shape (V, C) giving vertex colors where C is 3 or 4.
          faces: LongTensor of shape (F, 3) giving faces.
          faces_colors: FloatTensor of shape (V, C) giving face colors where C is 3 or 4.
          decimal_places: Number of decimal places for saving.
      """
      if len(verts) and not (verts.dim() == 2 and verts.size(1) == 3):
          message = "Argument 'verts' should either be empty or of shape (num_verts, 3)."
          raise ValueError(message)
  
      if verts_colors is not None and 0 == len(verts_colors):
          verts_colors = None
      if faces_colors is not None and 0 == len(faces_colors):
          faces_colors = None
      if faces is not None and 0 == len(faces):
          faces = None
  
      if verts_colors is not None:
          if not (
              verts_colors.dim() == 2 and verts_colors.size(1) in [3, 4]
          ):
              message = "verts_colors should have shape (num_faces, C)."
              raise ValueError(message)
          if verts_colors.shape[0] != verts.shape[0]:
              message = (
                  "verts_colors should have the same length as verts."
              )
              raise ValueError(message)
  
      if faces is not None and not (
          faces.dim() == 2 and faces.size(1) == 3
      ):
          message = "Argument 'faces' if present should have shape (num_faces, 3)."
          raise ValueError(message)
      if faces_colors is not None and faces is None:
          message = "Cannot have face colors without faces"
          raise ValueError(message)
  
      if faces_colors is not None:
          if not (
              faces_colors.dim() == 2 and faces_colors.size(1) in [3, 4]
          ):
              message = "faces_colors should have shape (num_faces, C)."
              raise ValueError(message)
          if (
              faces_colors.shape[0]
              != cast(torch.LongTensor, faces).shape[0]
          ):
              message = (
                  "faces_colors should have the same length as faces."
              )
              raise ValueError(message)
  
      with _open_file(file, path_manager, "wb") as f:
          _write_off_data(
              f,
              verts,
              verts_colors,
              faces,
              faces_colors,
              decimal_places,
          )
  
imports: import warnings
  from typing import cast, Optional, Tuple, Union
  import numpy
  import torch
  from iopath.common.file_io import PathManager
  from pytorch3d.io.utils import _check_faces_indices, _open_file, PathOrStr
  from pytorch3d.renderer import TexturesAtlas, TexturesVertex
  from pytorch3d.structures import Meshes
  from .pluggable_formats import endswith, MeshFormatInterpreter
label_desc: Use image node_id 8 for calling a global function with example usage: _save_off(file) without return types