<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def critical_point(self, cp_override: CriticalPoint = None) -> Point: """ The vector from the pipette's origin to its critical point. The critical point for a pipette is the end of the nozzle if no tip is attached, or the end of the tip if a tip is attached. If `cp_override` is specified and valid - so is either :py:attr:`CriticalPoint.NOZZLE` or :py:attr:`CriticalPoint.TIP` when we have a tip, or :py:attr:`CriticalPoint.XY_CENTER` - the specified critical point will be used. """

        if not self.has_tip or cp_override == CriticalPoint.NOZZLE:
            cp_type = CriticalPoint.NOZZLE
            tip_length = 0.0
        else:
            cp_type = CriticalPoint.TIP
            tip_length = self.current_tip_length
        if cp_override == CriticalPoint.XY_CENTER:
            mod_offset_xy = [0, 0, self.config.model_offset[2]]
            cp_type = CriticalPoint.XY_CENTER
        elif cp_override == CriticalPoint.FRONT_NOZZLE:
            mod_offset_xy = [
                0, -self.config.model_offset[1], self.config.model_offset[2]]
            cp_type = CriticalPoint.FRONT_NOZZLE
        else:
            mod_offset_xy = self.config.model_offset
        mod_and_tip = Point(mod_offset_xy[0],
                            mod_offset_xy[1],
                            mod_offset_xy[2] - tip_length)
        cp = mod_and_tip + self._instrument_offset._replace(z=0)
        if self._log.isEnabledFor(logging.DEBUG):
            mo = 'model offset: {} + '.format(self.config.model_offset)\
                if cp_type != CriticalPoint.XY_CENTER else ''
            info_str = 'cp: {}{}: {}=({}instr offset xy: {}'\
                .format(cp_type, '(from override)' if cp_override else '',
                        cp, mo,
                        self._instrument_offset._replace(z=0))
            if cp_type == CriticalPoint.TIP:
                info_str += '- current_tip_length: {}=(true tip length: {}'\
                    ' - inst z: {}) (z only)'.format(
                        self.current_tip_length, self._current_tip_length,
                        self._instrument_offset.z)
            info_str += ')'
            self._log.debug(info_str)
        return cp