def is_inline(tag):
    """
    A filter function, made to be used with BeautifulSoup.

    Makes sure the tag is `inline`, or has both data-inline-type
    and at least one of data-inline-{id,ids,filter} attributes.
    """
    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'