def _insert_point(self):
        """ Asks the user to insert a new point """
        dialog = PointDialog(self)
        if dialog.exec_():
            time, val = dialog.get_value()
            minutes = (time.hour() * 60 + time.minute()) / (24 * 60)

            if (val < self._selected_setting_handle.minvalue or val > self._selected_setting_handle.maxvalue):
                QMessageBox.information(self, "Invalid Value", "Value is out of setting range!", QMessageBox.Ok)
                return

            val_linear = self._selected_setting_handle.get_linear_value(val)
            self._selected_setting_handle.curves[0].append_cv(minutes, val_linear)
            self._cmd_queue.add("write_settings")
 Asks the user to insert a new point 
metadrive/render_pipeline/toolkit/day_time_editor/main.py