<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_instrument( self, instrument_name: str, mount: Union[types.Mount, str], tip_racks: List[Labware] = None, replace: bool = False) -> 'InstrumentContext': """ Load a specific instrument required by the protocol. This value will actually be checked when the protocol runs, to ensure that the correct instrument is attached in the specified location. :param str instrument_name: The name of the instrument model, or a prefix. For instance, 'p10_single' may be used to request a P10 single regardless of the version. :param mount: The mount in which this instrument should be attached. This can either be an instance of the enum type :py:class:`.types.Mount` or one of the strings `'left'` and `'right'`. :type mount: types.Mount or str :param tip_racks: A list of tip racks from which to pick tips if :py:meth:`.InstrumentContext.pick_up_tip` is called without arguments. :type tip_racks: List[:py:class:`.Labware`] :param bool replace: Indicate that the currently-loaded instrument in `mount` (if such an instrument exists) should be replaced by `instrument_name`. """

        if isinstance(mount, str):
            try:
                checked_mount = types.Mount[mount.upper()]
            except KeyError:
                raise ValueError(
                    "If mount is specified as a string, it should be either"
                    "'left' or 'right' (ignoring capitalization, which the"
                    " system strips), not {}".format(mount))
        elif isinstance(mount, types.Mount):
            checked_mount = mount
        else:
            raise TypeError(
                "mount should be either an instance of opentrons.types.Mount"
                " or a string, but is {}.".format(mount))
        self._log.info("Trying to load {} on {} mount"
                       .format(instrument_name, checked_mount.name.lower()))
        instr = self._instruments[checked_mount]
        if instr and not replace:
            raise RuntimeError("Instrument already present in {} mount: {}"
                               .format(checked_mount.name.lower(),
                                       instr.name))
        attached = {att_mount: instr.get('name', None)
                    for att_mount, instr
                    in self._hw_manager.hardware.attached_instruments.items()}
        attached[checked_mount] = instrument_name
        self._log.debug("cache instruments expectation: {}"
                        .format(attached))
        self._hw_manager.hardware.cache_instruments(attached)
        # If the cache call didn’t raise, the instrument is attached
        new_instr = InstrumentContext(
            ctx=self,
            hardware_mgr=self._hw_manager,
            mount=checked_mount,
            tip_racks=tip_racks,
            log_parent=self._log)
        self._instruments[checked_mount] = new_instr
        self._log.info("Instrument {} loaded".format(new_instr))
        return new_instr