class_docstr: Contains all the data + properties the user has passed to a check/suite, and validates it seamlessly.
  
  Parameters
  ----------
  train_dataset : Union[TextData, None] , default: None
      TextData object, representing data an estimator was fitted on
  test_dataset : Union[TextData, None] , default: None
      TextData object, representing data an estimator predicts on
  with_display : bool , default: True
      flag that determines if checks will calculate display (redundant in some checks).
  train_pred : Union[TTextPred, None] , default: None
      predictions on train dataset
  test_pred : Union[TTextPred, None] , default: None
      predictions on test dataset
  train_proba : Union[TTextProba, None] , default: None
      probabilities on train dataset
  test_proba : Union[TTextProba, None] , default: None
      probabilities on test dataset
  model_classes : Optional[List] , default: None
      list of classes known to the model
  random_state: int, default 42
      A seed to set for pseudo-random functions , primarily sampling.
class_docstr_tok: ["Contains","all","the","data","+","properties","the","user","has","passed","to","a","check\/suite",",","and","validates","it","seamlessly",".","Parameters","--","--","--","--","--","train_dataset",":","Union","[","TextData",",","None","]",",","default",":","None","TextData","object",",","representing","data","an","estimator","was","fitted","on","test_dataset",":","Union","[","TextData",",","None","]",",","default",":","None","TextData","object",",","representing","data","an","estimator","predicts","on","with_display",":","bool",",","default",":","True","flag","that","determines","if","checks","will","calculate","display","(","redundant","in","some","checks",")",".","train_pred",":","Union","[","TTextPred",",","None","]",",","default",":","None","predictions","on","train","dataset","test_pred",":","Union","[","TTextPred",",","None","]",",","default",":","None","predictions","on","test","dataset","train_proba",":","Union","[","TTextProba",",","None","]",",","default",":","None","probabilities","on","train","dataset","test_proba",":","Union","[","TTextProba",",","None","]",",","default",":","None","probabilities","on","test","dataset","model_classes",":","Optional","[","List","]",",","default",":","None","list","of","classes","known","to","the","model","random_state",":","int",",","default","42","A","seed","to","set","for","pseudo-random","functions",",","primarily","sampling","."]
docstr: Return initialized & validated scorer if provided or a default scorer otherwise.
  
  Parameters
  ----------
  scorer : t.Union[t.Mapping[str, t.Union[str, t.Callable]], t.List[str], None], default: None
      List of scorers to use. If None, use default scorers.
      Scorers can be supplied as a list of scorer names or as a dictionary of names and functions.
  use_avg_defaults : bool, default: True
      If no scorers were provided, for classification, determines whether to use default scorers that return
      an averaged metric, or default scorers that return a metric per class.
  Returns
  -------
  List[DeepcheckScorer]
      An initialized & validated scorer.
docstr_tok: ["Return","initialized","&","validated","scorer","if","provided","or","a","default","scorer","otherwise",".","Parameters","--","--","--","--","--","scorer",":","t.Union","[","t.Mapping","[","str",",","t.Union","[","str",",","t.Callable","]","]",",","t.List","[","str","]",",","None","]",",","default",":","None","List","of","scorers","to","use",".","If","None",",","use","default","scorers",".","Scorers","can","be","supplied","as","a","list","of","scorer","names","or","as","a","dictionary","of","names","and","functions",".","use_avg_defaults",":","bool",",","default",":","True","If","no","scorers","were","provided",",","for","classification",",","determines","whether","to","use","default","scorers","that","return","an","averaged","metric",",","or","default","scorers","that","return","a","metric","per","class",".","Returns","--","--","--","-","List","[","DeepcheckScorer","]","An","initialized","&","validated","scorer","."]
code: def get_single_scorer(
      self,
      scorer: t.Union[
          t.Mapping[str, t.Union[str, t.Callable]], t.List[str], None
      ] = None,
      use_avg_defaults=True,
  ) -> DeepcheckScorer:
      """Return initialized & validated scorer if provided or a default scorer otherwise.
  
      Parameters
      ----------
      scorer : t.Union[t.Mapping[str, t.Union[str, t.Callable]], t.List[str], None], default: None
          List of scorers to use. If None, use default scorers.
          Scorers can be supplied as a list of scorer names or as a dictionary of names and functions.
      use_avg_defaults : bool, default: True
          If no scorers were provided, for classification, determines whether to use default scorers that return
          an averaged metric, or default scorers that return a metric per class.
      Returns
      -------
      List[DeepcheckScorer]
          An initialized & validated scorer.
      """
      return self.get_scorers(scorer, use_avg_defaults)[0]
  
imports: import typing
  from operator import itemgetter
  import numpy
  from deepchecks.core.context import BaseContext
  from deepchecks.core.errors import DatasetValidationError, DeepchecksNotSupportedError, DeepchecksValueError, ModelValidationError
  from deepchecks.nlp.input_validations import _validate_multilabel, _validate_text_classification, _validate_token_classification, compare_dataframes
  from deepchecks.nlp.metric_utils.scorers import init_validate_scorers
  from deepchecks.nlp.metric_utils.token_classification import get_default_token_scorers, get_scorer_dict, validate_scorers
  from deepchecks.nlp.task_type import TaskType
  from deepchecks.nlp.text_data import TextData
  from deepchecks.nlp.utils.data_inference import infer_observed_and_model_labels
  from deepchecks.tabular.metric_utils import DeepcheckScorer, get_default_scorers
  from deepchecks.tabular.utils.task_type import TaskType
  from deepchecks.utils.docref import doclink
  from deepchecks.utils.logger import get_logger
  from deepchecks.utils.typing import BasicModel
  from deepchecks.utils.validation import is_sequence_not_str
label_desc: Use image node_id 15 for calling the Context obj's underlying member method code with example usage: obj.get_single_scorer(scorer, use_avg_defaults) and returns: self