def _get_subclasses(model):
    subclasses = [model]
    for f in model._meta.get_all_field_names():
        field = model._meta.get_field_by_name(f)[0]
        if (isinstance(field, RelatedObject) or
            getattr(field.field.rel, "parent_link", None)):
            subclasses.extend(_get_subclasses(field.model))
    return subclasses
dataset/ETHPy150Open lmorchard/badg.us/vendor-local/lib/python/taggit/managers.py/_get_subclasses/operator `and` -> `or`