'Call a desired function on a Jedi Script and return the result'

def get_jedi_object(self, func_name, info, use_filename=True):

    if (not jedi):
        return
    if DEBUG_EDITOR:
        t0 = time.time()
    metas = sys.meta_path
    for meta in metas:
        if ((meta.__class__.__name__ == 'ImportDenier') and hasattr(meta, 'forbid')):
            sys.meta_path.remove(meta)
    if use_filename:
        filename = info['filename']
    else:
        filename = None
    try:
        script = jedi.Script(info['source_code'], info['line_num'], info['column'], filename)
        func = getattr(script, func_name)
        val = func()
    except Exception as e:
        val = None
        debug_print(('Jedi    error    (%s)' % func_name))
        debug_print(str(e))
        if DEBUG_EDITOR:
            log_last_error(LOG_FILENAME, str(e))
    if DEBUG_EDITOR:
        log_dt(LOG_FILENAME, func_name, t0)
    if ((not val) and filename):
        return self.get_jedi_object(func_name, info, False)
    else:
        return val
