code: def get_logs(
      experiment_name: Optional[str] = None, save: bool = False
  ) -> pd.DataFrame:
      """
      Returns a table of experiment logs. Only works when ``log_experiment``
      is True when initializing the ``setup`` function.
  
  
      Example
      -------
      >>> from pycaret.datasets import get_data
      >>> anomaly = get_data('anomaly')
      >>> from pycaret.anomaly import *
      >>> exp_name = setup(data = anomaly,  log_experiment = True)
      >>> knn = create_model('knn')
      >>> exp_logs = get_logs()
  
  
      experiment_name: str, default = None
          When None current active run is used.
  
  
      save: bool, default = False
          When set to True, csv file is saved in current working directory.
  
  
      Returns:
          pandas.DataFrame
  
      """
  
      return _CURRENT_EXPERIMENT.get_logs(
          experiment_name=experiment_name, save=save
      )
  
imports: import logging
  import os
  from typing import Any, BinaryIO, Callable, Dict, List, Optional, Union
  import pandas
  from joblib.memory import Memory
  from pycaret.anomaly.oop import AnomalyExperiment
  from pycaret.loggers.base_logger import BaseLogger
  from pycaret.utils.constants import DATAFRAME_LIKE, SEQUENCE_LIKE
  from pycaret.utils.generic import check_if_global_is_not_none
label_desc: Use image node_id 12 for calling a global function with example usage: get_logs(experiment_name, save) and returns: _CURRENT_EXPERIMENT