<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _build_cached_instances(self):
 """ Build lookup table of VM instances known to the cloud provider. The returned dictionary links VM id with the actual VM object. """

        connection = self._connect()
        reservations = connection.get_all_reservations()
        cached_instances = {}
        for rs in reservations:
            for vm in rs.instances:
                cached_instances[vm.id] = vm
        return cached_instances