code: def parse_mesh_header(plyfile, ext):
      # Variables
      line = []
      vertex_properties = []
      num_points = None
      num_faces = None
      current_element = None
  
      while b"end_header" not in line and line != b"":
          line = plyfile.readline()
  
          # Find point element
          if b"element vertex" in line:
              current_element = "vertex"
              line = line.split()
              num_points = int(line[2])
  
          elif b"element face" in line:
              current_element = "face"
              line = line.split()
              num_faces = int(line[2])
  
          elif b"property" in line:
              if current_element == "vertex":
                  line = line.split()
                  vertex_properties.append(
                      (line[2].decode(), ext + ply_dtypes[line[1]])
                  )
              elif current_element == "vertex":
                  if not line.startswith("property list uchar int"):
                      raise ValueError(
                          "Unsupported faces property : " + line
                      )
  
      return num_points, num_faces, vertex_properties
  
file_path: torch-points3d/torch_points3d/modules/KPConv/plyutils.py
imports: import numpy
  import sys
  import logging
label_desc: Use image node_id 2 for calling a global function with example usage: parse_mesh_header(plyfile, ext) and returns: num_points,  num_faces,  vertex_properties