'Return the Python ctor for the given class element, or None.'

def _ctor_hit_from_class(self, elem, scoperef):

    if ('__init__' in elem.names):
        class_scoperef = (scoperef[0], (scoperef[1] + [elem.get('name')]))
        return (elem.names['__init__'], class_scoperef)
    else:
        for classref in elem.get('classrefs', '').split():
            try:
                basehit = self._hit_from_type_inference(classref, scoperef)
            except CodeIntelError as ex:
                self.warn(str(ex))
            else:
                ctor_hit = self._ctor_hit_from_class(*basehit)
                if ctor_hit:
                    return ctor_hit
    return None
