code: def _save_points3D_bin(self, output_file):
      num_valid_points3D = sum(
          1
          for point3D_idx in self.point3D_id_to_point3D_idx.values()
          if point3D_idx != SceneManager.INVALID_POINT3D
      )
  
      iter_point3D_id_to_point3D_idx = (
          self.point3D_id_to_point3D_idx.items()
      )
  
      with open(output_file, "wb") as fid:
          fid.write(struct.pack("L", num_valid_points3D))
  
          for point3D_id, point3D_idx in iter_point3D_id_to_point3D_idx:
              if point3D_idx == SceneManager.INVALID_POINT3D:
                  continue
  
              fid.write(struct.pack("L", point3D_id))
              fid.write(self.points3D[point3D_idx].tobytes())
              fid.write(self.point3D_colors[point3D_idx].tobytes())
              fid.write(self.point3D_errors[point3D_idx].tobytes())
              fid.write(
                  struct.pack(
                      "L", len(self.point3D_id_to_images[point3D_id])
                  )
              )
              fid.write(self.point3D_id_to_images[point3D_id].tobytes())
  
imports: from collections import OrderedDict, defaultdict
  from io import StringIO
  from itertools import combinations
  import os
  import struct
  from .camera import Camera
  from .image import Image
  import numpy
  from .rotation import Quaternion
label_desc: Use image node_id 21 for calling the SceneManager obj's underlying member method code with example usage: obj._save_points3D_bin(output_file) without return types