code: def _get_verts_column_indices(
      vertex_head: _PlyElementType,
  ) -> _VertsColumnIndices:
      """
      Get the columns of verts, verts_colors, and verts_normals in the vertex
      element of a parsed ply file, together with a color scale factor.
      When the colors are in byte format, they are scaled from 0..255 to [0,1].
      Otherwise they are not scaled.
  
      For example, if the vertex element looks as follows:
  
          element vertex 892
          property double x
          property double y
          property double z
          property double nx
          property double ny
          property double nz
          property uchar red
          property uchar green
          property uchar blue
          property double texture_u
          property double texture_v
  
      then the return value will be ([0,1,2], [6,7,8], 1.0/255, [3,4,5])
  
      Args:
          vertex_head: as returned from load_ply_raw.
  
      Returns:
          _VertsColumnIndices object
      """
      point_idxs: List[Optional[int]] = [None, None, None]
      color_idxs: List[Optional[int]] = [None, None, None]
      normal_idxs: List[Optional[int]] = [None, None, None]
      texture_uv_idxs: List[Optional[int]] = [None, None]
      for i, prop in enumerate(vertex_head.properties):
          if prop.list_size_type is not None:
              raise ValueError(
                  "Invalid vertices in file: did not expect list."
              )
          for j, letter in enumerate(["x", "y", "z"]):
              if prop.name == letter:
                  point_idxs[j] = i
          for j, name in enumerate(["red", "green", "blue"]):
              if prop.name == name:
                  color_idxs[j] = i
          for j, name in enumerate(["nx", "ny", "nz"]):
              if prop.name == name:
                  normal_idxs[j] = i
          for j, name in enumerate(["texture_u", "texture_v"]):
              if prop.name == name:
                  texture_uv_idxs[j] = i
      if None in point_idxs:
          raise ValueError("Invalid vertices in file.")
      color_scale = 1.0
      if all(
          idx is not None
          and _PLY_TYPES[vertex_head.properties[idx].data_type].size
          == 1
          for idx in color_idxs
      ):
          color_scale = 1.0 / 255
      return _VertsColumnIndices(
          point_idxs=point_idxs,
          color_idxs=None if None in color_idxs else color_idxs,
          color_scale=color_scale,
          normal_idxs=None if None in normal_idxs else normal_idxs,
          texture_uv_idxs=None
          if None in texture_uv_idxs
          else texture_uv_idxs,
      )
  
imports: import itertools
  import os
  import struct
  import sys
  import warnings
  from collections import namedtuple
  from dataclasses import asdict, dataclass
  from io import BytesIO, TextIOBase
  from typing import List, Optional, Tuple
  import numpy
  import torch
  from iopath.common.file_io import PathManager
  from pytorch3d.io.utils import _check_faces_indices, _make_tensor, _open_file, _read_image, PathOrStr
  from pytorch3d.renderer import TexturesUV, TexturesVertex
  from pytorch3d.structures import Meshes, Pointclouds
  from .pluggable_formats import endswith, MeshFormatInterpreter, PointcloudFormatInterpreter
label_desc: Use image node_id 13 for calling a global function with example usage: _get_verts_column_indices(vertex_head) and returns: _VertsColumnIndices