<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_instrument(self, mount, instrument):
 """ Adds instrument to a robot. Parameters mount : str Specifies which axis the instruments is attached to. Valid options are "left" or "right". instrument : Instrument An instance of a :class:`Pipette` to attached to the axis. Notes ----- A canonical way to add to add a Pipette to a robot is: :: from opentrons import instruments m300 = instruments.P300_Multi(mount='left') This will create a pipette and call :func:`add_instrument` to attach the instrument. """

        if mount in self._instruments:
            prev_instr = self._instruments[mount]
            raise RuntimeError('Instrument {0} already on {1} mount'.format(
                prev_instr.name, mount))
        self._instruments[mount] = instrument

        instrument.instrument_actuator = self._actuators[mount]['plunger']
        instrument.instrument_mover = self._actuators[mount]['carriage']

        # instrument_offset is the distance found (with tip-probe) between
        # the pipette's expected position, and the actual position
        # this is expected to be no greater than ~3mm
        # Z is not included, because Z offsets found during tip-probe are used
        # to determined the tip's length
        cx, cy, _ = self.config.instrument_offset[mount][instrument.type]

        # model_offset is the expected position of the pipette, determined
        # by designed dimensions of that model (eg: p10-multi vs p300-single)
        mx, my, mz = instrument.model_offset

        # combine each offset to get the pipette's position relative to gantry
        _x, _y, _z = (
            mx + cx,
            my + cy,
            mz
        )
        # if it's the left mount, apply the offset from right pipette
        if mount == 'left':
            _x, _y, _z = (
               _x + self.config.mount_offset[0],
               _y + self.config.mount_offset[1],
               _z + self.config.mount_offset[2]
            )
        self.poses = pose_tracker.add(
            self.poses,
            instrument,
            parent=mount,
            point=(_x, _y, _z)
        )