def is_inline(tag):
    check_type  = lambda attr: attr[0] == 'data-inline-type'
    check_attrs = lambda attr: attr[0] == 'data-inline-id' \
                            or attr[0] == 'data-inline-ids' \
                            or attr[0] == 'data-inline-filter'
    checks_out = filter(check_type, tag.attrs) and filter(check_attrs, tag.attrs)
    return checks_out or tag.name == 'inline'
A filter function, made to be used with BeautifulSoup.
dataset/ETHPy150Open issackelly/django-improved-inlines/improved_inlines/parser.py/is_inline