class_docstr: Abstract class :class:`Reporter` for result visualisation.
docstr: Return the entry from the database which corresponds to the best
  scoring experiment.
  
  Args:
      criterion: :obj:`str` or :obj:`Callable`. The function used to
          determine whether the highest or lowest score is requested. If
          several evaluation metrics are present, then a custom `criterion`
          must be supplied.
  
  Returns:
      JSON object or `None` if the database is empty. The content of the
      database for the best experiment.
docstr_tok: ["Return","the","entry","from","the","database","which","corresponds","to","the","best","scoring","experiment",".","Args",":","criterion",":",":","obj",":","`","str","`","or",":","obj",":","`","Callable","`",".","The","function","used","to","determine","whether","the","highest","or","lowest","score","is","requested",".","If","several","evaluation","metrics","are","present",",","then","a","custom","`","criterion","`","must","be","supplied",".","Returns",":","JSON","object","or","`","None","`","if","the","database","is","empty",".","The","content","of","the","database","for","the","best","experiment","."]
code: def get_best(
      self, criterion: Union[str, Callable] = "max"
  ) -> Optional[Dict[str, Any]]:
      """Return the entry from the database which corresponds to the best
      scoring experiment.
  
      Args:
          criterion: :obj:`str` or :obj:`Callable`. The function used to
              determine whether the highest or lowest score is requested. If
              several evaluation metrics are present, then a custom `criterion`
              must be supplied.
  
      Returns:
          JSON object or `None` if the database is empty. The content of the
          database for the best experiment.
      """
      if not self._db_default_table:
          return None
      if isinstance(criterion, str):
          predefined = {"max": max, "min": min}
          if criterion not in predefined:
              raise ValueError(
                  f"Unknown criterion for finding best experiment. "
                  f"Select one from {list(predefined.keys())} "
                  f"or supply a custom function."
              )
          selection_fn = predefined[criterion]
      elif isinstance(criterion, Callable):
          selection_fn = criterion
      else:
          raise TypeError(
              "The criterion must be of type str or Callable."
          )
      return self._get_best_from_db(selection_fn)
  
imports: import abc
  import datetime
  import os
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import tinydb
  from hypertunity.domain import Domain, Sample
  from hypertunity.optimisation.base import EvaluationScore, HistoryPoint
label_desc: Use image node_id 8 for calling the Reporter obj's underlying member method code with example usage: obj.get_best(criterion) and returns: self, None