'Resolve the function call inference for \'elem\' at \'scoperef\'.'

def _hit_from_call(self, elem, scoperef):

    while (elem.tag == 'variable'):
        (elem, scoperef) = self._hit_from_variable_type_inference(elem, scoperef)
    ilk = elem.get('ilk')
    if (ilk == 'class'):
        self.log("_hit_from_call:    resolved    to    class    '%s'", elem.get('name'))
        return (elem, scoperef)
    if (ilk == 'function'):
        citdl = elem.get('returns')
        if citdl:
            self.log('_hit_from_call:    function    with    citdl    %r', citdl)
            func_scoperef = (scoperef[0], (scoperef[1] + [elem.get('name')]))
            return self._hit_from_citdl(citdl, func_scoperef)
    raise CodeIntelError(('no    return    type    info    for    %r' % elem))
