(
        self, axis: str, data: Dict[str, float]
    )
return res_msg
Updates the following configs for a given pipette mount based on
        the detected pipette type:
        - homing positions M365.0
        - Max Travel M365.1
        - endstop debounce M365.2 (NOT for zprobe debounce)
        - retract from endstop distance M365.3

        Returns the data as the value of a dict with the axis as a key.
        For instance, calling update_pipette_config('B', {'retract': 2})
        would return (if successful) {'B': {'retract': 2}}
Updates the following configs for a given pipette mount based on
        the detected pipette type:
        - homing positions M365.0
        - Max Travel M365.1
        - endstop debounce M365.2 (NOT for zprobe debounce)
        - retract from endstop distance M365.3
Updates the following configs for a given pipette mount based on the detected pipette type : - homing positions M365 . 0 - Max Travel M365 . 1 - endstop debounce M365 . 2 ( NOT for zprobe debounce ) - retract from endstop distance M365 . 3
async def update_pipette_config(
        self, axis: str, data: Dict[str, float]
    ) -> Dict[str, Dict[str, float]]:
        """
        Updates the following configs for a given pipette mount based on
        the detected pipette type:
        - homing positions M365.0
        - Max Travel M365.1
        - endstop debounce M365.2 (NOT for zprobe debounce)
        - retract from endstop distance M365.3

        Returns the data as the value of a dict with the axis as a key.
        For instance, calling update_pipette_config('B', {'retract': 2})
        would return (if successful) {'B': {'retract': 2}}
        """
        if self.simulating:
            return {axis: data}

        gcodes = {
            "retract": GCODE.PIPETTE_RETRACT,
            "debounce": GCODE.PIPETTE_DEBOUNCE,
            "max_travel": GCODE.PIPETTE_MAX_TRAVEL,
            "home": GCODE.PIPETTE_HOME,
        }

        res_msg: Dict[str, Dict[str, float]] = {axis: {}}

        for key, value in data.items():
            cmd = _command_builder().add_gcode(gcode=gcodes[key])
            if key == "debounce":
                # debounce variable for all axes, so do not specify an axis
                cmd.add_float(prefix="O", value=value, precision=None)
            else:
                cmd.add_float(prefix=axis, value=value, precision=None)
            res = await self._send_command(cmd)
            if res is None:
                raise ValueError(f"{key} was not updated to {value} on {axis} axis")
            res_msg[axis][key] = value

        return res_msg
async def update_pipette_config ( self , axis : str , data : Dict [ str , float ] ) -> Dict [ str , Dict [ str , float ] ] : if self . simulating : return { axis : data } gcodes = { "retract" : GCODE . PIPETTE_RETRACT , "debounce" : GCODE . PIPETTE_DEBOUNCE , "max_travel" : GCODE . PIPETTE_MAX_TRAVEL , "home" : GCODE . PIPETTE_HOME , } res_msg : Dict [ str , Dict [ str , float ] ] = { axis : { } } for key , value in data . items ( ) : cmd = _command_builder ( ) . add_gcode ( gcode = gcodes [ key ] ) if key == "debounce" : # debounce variable for all axes, so do not specify an axis cmd . add_float ( prefix = "O" , value = value , precision = None ) else : cmd . add_float ( prefix = axis , value = value , precision = None ) res = await self . _send_command ( cmd ) if res is None : raise ValueError ( f"{key} was not updated to {value} on {axis} axis" ) res_msg [ axis ] [ key ] = value return res_msg