<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_jobs_from_runner(self, outstanding_jids):
        '''
        Given a list of job_ids, return a dictionary of those job_ids that have
        completed and their results.

        Query the salt event bus via the jobs runner. jobs.list_job will show
        a job in progress, jobs.lookup_jid will return a job that has
        completed.

        returns a dictionary of job id: result
        '''
        # Can't use the runner because of https://github.com/saltstack/salt/issues/40671
        runner = salt.runner.RunnerClient(__opts__)
        source = __opts__.get('ext_job_cache')
        if not source:
            source = __opts__.get('master_job_cache')

        results = {}
        for jid in outstanding_jids:
            # results[jid] = runner.cmd('jobs.lookup_jid', [jid])
            if self.master_minion.returners['{}.get_jid'.format(source)](jid):
                job_result = runner.cmd('jobs.list_job', [jid])
                jid_result = job_result.get('Result', {})
                jid_function = job_result.get('Function', {})
                # emulate lookup_jid's return, which is just minion:return
                results[jid] = {
                    'data': salt.utils.json.loads(salt.utils.json.dumps(jid_result)),
                    'function': jid_function
                }

        return results