class_docstr: Custom filter for the GET list that filters all certified charts
class_docstr_tok: ["Custom","filter","for","the","GET","list","that","filters","all","certified","charts"]
code: def apply(self, query: Query, value: Any) -> Query:
      if value is True:
          return query.filter(and_(Slice.certified_by.isnot(None)))
      if value is False:
          return query.filter(and_(Slice.certified_by.is_(None)))
      return query
  
imports: from typing import Any
  from flask_babel import lazy_gettext
  from sqlalchemy import and_, or_
  from sqlalchemy.orm import aliased
  from sqlalchemy.orm.query import Query
  from superset import db, security_manager
  from superset.connectors.sqla import models
  from superset.connectors.sqla.models import SqlaTable
  from superset.models.core import FavStar
  from superset.models.slice import Slice
  from superset.utils.core import get_user_id
  from superset.utils.filters import get_dataset_access_filters
  from superset.views.base import BaseFilter
  from superset.views.base_api import BaseFavoriteFilter, BaseTagFilter
label_desc: Use image node_id 1 for calling the ChartCertifiedFilter obj's underlying member method code with example usage: obj.apply(query, value) and returns: query, query, query