def METHOD_NAME(menu_item):
    if isinstance(menu_item, MainMenuItemId):
        item_id = menu_item
        item = None
    elif isinstance(menu_item, AbstractMenuItem):
        item_id = menu_item.ident
        item = menu_item
    else:
        raise ValueError()
    if corpus_dependent is False and item is not None and item.corpus_dependent is True:
        return True
    for item in disabled_items:
        if item_id.matches(item):
            return True
    return False