<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_attached_instruments( self, expected: Dict[Mount, str])\ -> Dict[Mount, Dict[str, Optional[str]]]: """ Find the instruments attached to our mounts. :param expected: A dict that may contain a mapping from mount to strings that should prefix instrument model names. When instruments are scanned, they are matched against the expectation (if present) and a :py:attr:`RuntimeError` is raised if there is no match. :raises RuntimeError: If an instrument is expected but not found. :returns: A dict with mounts as the top-level keys. Each mount value is a dict with keys 'mount' (containing an instrument model name or `None`) and 'id' (containing the serial number of the pipette attached to that mount, or `None`). """

        to_return: Dict[Mount, Dict[str, Optional[str]]] = {}
        for mount in Mount:
            found_model = self._smoothie_driver.read_pipette_model(
                mount.name.lower())
            found_id = self._smoothie_driver.read_pipette_id(
                mount.name.lower())
            expected_instr = expected.get(mount, None)
            if expected_instr and\
               (not found_model or not found_model.startswith(expected_instr)):
                raise RuntimeError(
                    'mount {}: instrument {} was requested but {} is present'
                    .format(mount.name, expected_instr, found_model))
            to_return[mount] = {
                'model': found_model,
                'id': found_id}
        return to_return