def find_class(self, class_ref):
    class_idx = class_ref
    if isinstance(class_ref, six.string_types):
        class_mangled = mangle_classname(class_ref)
        class_str_idx = self.find_string_idx(class_mangled)
        if (class_str_idx >= 0):
            class_idx = self.find_type_idx(class_str_idx)
    if isinstance(class_idx, numbers.Integral):
        classes = self.get_classes()
        for cls in classes:
            if (cls.class_def.class_idx == class_idx):
                return cls
    return None
def find_class(self, class_ref):
    class_idx = class_ref
    if isinstance(class_ref, six.string_types):
        class_mangled = mangle_classname(class_ref)
        class_str_idx = self.find_string_idx(class_mangled)
        if (class_str_idx >= 0):
            class_idx = self.find_type_idx(class_str_idx)
    if isinstance(class_idx, numbers.Integral):
        classes = self.get_classes()
        for cls in classes:
            if (cls.class_def.class_idx == class_idx):
                return cls
    return None