def __init__(self, parent):
        """ Constructs the CurveWidget, we start with an initial curve """
        QWidget.__init__(self, parent)
        self.setFocusPolicy(Qt.ClickFocus)
        self._curves = []

        # Store current display time
        self._current_time = 0.5

        # Widget render constants
        self._cv_point_size = 3
        self._legend_border = 52
        self._bar_h = 30

        # Currently dragged control point, format is:
        # (CurveIndex, PointIndex, Drag-Offset (x,y))
        self._drag_point = None
        self._drag_time = 0.0

        # Currently selected control point, format is:
        # (CurveIndex, PointIndex)
        self._selected_point = None

        self._unit_processor = lambda v: str(round(v, 2))
        self._change_handler = lambda: None
 Constructs the CurveWidget, we start with an initial curve 
metadrive/render_pipeline/toolkit/day_time_editor/curve_widget.py