code: def to_debug_message(
          self, text: str, color=None, pos: Optional[Union[Point2, Point3]] = None, size: int = 8
      ) -> debug_pb.DebugText:
          
          color = self.to_debug_color(color)
          pt3d = self.to_debug_point(pos) if isinstance(pos, Point3) else None
          virtual_pos = self.to_debug_point(pos) if not isinstance(pos, Point3) else None
  
          return debug_pb.DebugText(color=color, text=text, virtual_pos=virtual_pos, world_pos=pt3d, size=size)
docs: Helper function to create debug texts