class_docstr: Filter to apply on related roles.
class_docstr_tok: ["Filter","to","apply","on","related","roles","."]
code: def apply(self, query: Query, value: Optional[Any]) -> Query:
      if extra_filters := current_app.config[
          "EXTRA_RELATED_QUERY_FILTERS"
      ].get(
          "role",
      ):
          return extra_filters(query)
  
      return query
  
file_path: superset/superset/views/filters.py
imports: import logging
  from typing import Any, cast, Optional
  from flask import current_app
  from flask_appbuilder.models.filters import BaseFilter
  from flask_babel import lazy_gettext
  from sqlalchemy import and_, or_
  from sqlalchemy.orm import Query
  from superset import security_manager
label_desc: Use image node_id 1 for calling the BaseFilterRelatedRoles obj's underlying member method code with example usage: obj.apply(query, value) and returns: query, extra_filters