<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _spawn_minions(self, timeout=60):
        '''
        Spawn all the coroutines which will sign in to masters
        '''
        # Run masters discovery over SSDP. This may modify the whole configuration,
        # depending of the networking and sets of masters. If match is 'any' we let
        # eval_master handle the discovery instead so disconnections can also handle
        # discovery
        if isinstance(self.opts['discovery'], dict) and self.opts['discovery'].get('multimaster'):
            self._discover_masters()

        masters = self.opts['master']
        if (self.opts['master_type'] in ('failover', 'distributed')) or not isinstance(self.opts['master'], list):
            masters = [masters]

        for master in masters:
            s_opts = copy.deepcopy(self.opts)
            s_opts['master'] = master
            s_opts['multimaster'] = True
            minion = self._create_minion_object(s_opts,
                                                s_opts['auth_timeout'],
                                                False,
                                                io_loop=self.io_loop,
                                                loaded_base_name='salt.loader.{0}'.format(s_opts['master']),
                                                jid_queue=self.jid_queue)
            self.io_loop.spawn_callback(self._connect_minion, minion)
        self.io_loop.call_later(timeout, self._check_minions)