code: def read_points3D_text(path):
      """
      see: src/base/reconstruction.cc
          void Reconstruction::ReadPoints3DText(const std::string& path)
          void Reconstruction::WritePoints3DText(const std::string& path)
      """
      xyzs = None
      rgbs = None
      errors = None
      num_points = 0
      with open(path, "r") as fid:
          while True:
              line = fid.readline()
              if not line:
                  break
              line = line.strip()
              if len(line) > 0 and line[0] != "#":
                  num_points += 1
  
      xyzs = np.empty((num_points, 3))
      rgbs = np.empty((num_points, 3))
      errors = np.empty((num_points, 1))
      count = 0
      with open(path, "r") as fid:
          while True:
              line = fid.readline()
              if not line:
                  break
              line = line.strip()
              if len(line) > 0 and line[0] != "#":
                  elems = line.split()
                  xyz = np.array(tuple(map(float, elems[1:4])))
                  rgb = np.array(tuple(map(int, elems[4:7])))
                  error = np.array(float(elems[7]))
                  xyzs[count] = xyz
                  rgbs[count] = rgb
                  errors[count] = error
                  count += 1
  
      return xyzs, rgbs, errors
  
file_path: gaussian-splatting/scene/colmap_loader.py
imports: import numpy
  import collections
  import struct
label_desc: Use image node_id 4 for calling a global function with example usage: read_points3D_text(path) and returns: xyzs,  rgbs,  errors