Return the information returned when the specified job id was executed

def get_jid(jid):
    '''
    Return the information returned when the specified job id was executed
    '''
    jid_dir = salt.utils.jid.jid_dir(jid, _job_dir(), __opts__['hash_type'])
    serial = salt.payload.Serial(__opts__)

    ret = {}
    # Check to see if the jid is real, if not return the empty dict
    if not os.path.isdir(jid_dir):
        return ret
    for fn_ in os.listdir(jid_dir):
        if fn_.startswith('.'):
            continue
        if fn_ not in ret:
            retp = os.path.join(jid_dir, fn_, RETURN_P)
            outp = os.path.join(jid_dir, fn_, OUT_P)
            if not os.path.isfile(retp):
                continue
            while fn_ not in ret:
                try:
                    with salt.utils.files.fopen(retp, 'rb') as rfh:
                        ret_data = serial.load(rfh)
                    if not isinstance(ret_data, dict) or 'return' not in ret_data:
                        # Convert the old format in which return.p contains the only return data to
                        # the new that is dict containing 'return' and optionally 'retcode' and
                        # 'success'.
                        ret_data = {'return': ret_data}
                    ret[fn_] = ret_data
                    if os.path.isfile(outp):
                        with salt.utils.files.fopen(outp, 'rb') as rfh:
                            ret[fn_]['out'] = serial.load(rfh)
                except Exception as exc:
                    if 'Permission denied:' in six.text_type(exc):
                        raise
    return ret