class_docstr: Base class for similarity explainers.
docstr: Verify that the explainer has been fitted.
  
  Raises
  ------
  ValueError
      If the explainer has not been fitted.
docstr_tok: ["Verify","that","the","explainer","has","been","fitted",".","Raises","--","--","--","ValueError","If","the","explainer","has","not","been","fitted","."]
code: def _verify_fit(self) -> None:
      """Verify that the explainer has been fitted.
  
      Raises
      ------
      ValueError
          If the explainer has not been fitted.
      """
      if not hasattr(self, "X_train") or not hasattr(self, "Y_train"):
          raise ValueError(
              "Training data not set. Call `fit` and pass training data first."
          )
  
imports: from abc import ABC
  from typing import TYPE_CHECKING, Any, Callable, List, Optional, Union
  import numpy
  from alibi.api.interfaces import Explainer
  from alibi.explainers.similarity.backends import _select_backend
  from alibi.utils.frameworks import Framework, has_pytorch, has_tensorflow
  from alibi.utils.missing_optional_dependency import import_optional
  from tqdm import tqdm
  from typing_extensions import Literal
label_desc: Use image node_id 5 for calling the BaseSimilarityExplainer obj's underlying member method code with example usage: obj._verify_fit() without return types