class_docstr: Defines the mixin for text explanations.
class_docstr_tok: ["Defines","the","mixin","for","text","explanations","."]
docstr: Validate that the explanation object passed in is a valid TextExplanation.
  
  :param explanation: The explanation to be validated.
  :type explanation: object
  :return: True if valid else False
  :rtype: bool
docstr_tok: ["Validate","that","the","explanation","object","passed","in","is","a","valid","TextExplanation",".",":","param","explanation",":","The","explanation","to","be","validated",".",":","type","explanation",":","object",":","return",":","True","if","valid","else","False",":","rtype",":","bool"]
code: def _does_quack(cls, explanation):
      """Validate that the explanation object passed in is a valid TextExplanation.
  
      :param explanation: The explanation to be validated.
      :type explanation: object
      :return: True if valid else False
      :rtype: bool
      """
      if not super()._does_quack(explanation):
          return False
      if (
          not hasattr(explanation, ExplainParams.LOCAL_IMPORTANCE_RANK)
          or explanation.local_importance_rank is None
      ):
          return False
      if (
          not hasattr(
              explanation, ExplainParams.ORDERED_LOCAL_IMPORTANCE_VALUES
          )
          or explanation.ordered_local_importance_values is None
      ):
          return False
      return True
  
file_path: interpret-text/python/interpret_text/experimental/explanation.py
imports: import numpy
  import uuid
  from interpret_community.common.explanation_utils import _sort_values, _order_imp
  from interpret_community.common.constants import Dynamic, ExplanationParams, ExplainParams
  from interpret_community.explanation.explanation import LocalExplanation, ExpectedValuesMixin, ClassesMixin
label_desc: Use image node_id 5 for calling the TextExplanation obj's underlying member method code with example usage: obj._does_quack(cls, explanation) and returns: True, False, False, False