docstr: Logs the function and then runs it
  
  Parameters
  ----------
  action : string, default=None
      The desired action to be logged (i.e: 'confusion_matrix', 'roc').
      If `action=None` it will log the function's name.
  
  feature: string, default=None
      The main feature (i.e: 'plot', 'report',
      'SQLiteTracker', 'NotebookCollection')
docstr_tok: ["Logs","the","function","and","then","runs","it","Parameters","--","--","--","--","--","action",":","string",",","default=None","The","desired","action","to","be","logged","(","i.e",":","'confusion_matrix","'",",","'roc","'",")",".","If","`","action=None","`","it","will","log","the","function","'s","name",".","feature",":","string",",","default=None","The","main","feature","(","i.e",":","'plot","'",",","'report","'",",","'SQLiteTracker","'",",","'NotebookCollection","'",")"]
code: def log(self, action=None, feature=None):
      """Logs the function and then runs it
  
      Parameters
      ----------
      action : string, default=None
          The desired action to be logged (i.e: 'confusion_matrix', 'roc').
          If `action=None` it will log the function's name.
  
      feature: string, default=None
          The main feature (i.e: 'plot', 'report',
          'SQLiteTracker', 'NotebookCollection')
      """
  
      def wrapper(func):
          @wraps(func)
          def inner(*args, **kwargs):
              metadata = self._prepare_metadata(
                  self, func, action, feature, *args, **kwargs
              )
              telemetry.log_api("sklearn-evaluation", metadata=metadata)
  
              try:
                  result = func(*args, **kwargs)
              except Exception as e:
                  metadata["exception"] = str(e)
                  telemetry.log_api(
                      "sklearn-evaluation-error", metadata=metadata
                  )
                  raise e
  
              return result
  
          return inner
  
      return wrapper
  
file_path: sklearn-evaluation/src/sklearn_evaluation/telemetry.py
imports: from functools import wraps
  import inspect
  from inspect import signature
  from ploomber_core.telemetry.telemetry import Telemetry
label_desc: Use image node_id 2 for calling the SKLearnEvaluationLogger obj's underlying member method code with example usage: obj.log(action, feature) and returns: wrapper, inner, result