class_docstr: The argilla dataset listener class
  
  Args:
      dataset: The dataset over which listener is created
      action: The action to execute when the condition is satisfied
      metrics: A list of metrics ids that will be required in condition
      query: The query string to apply
      query_params: Defined parameters used dynamically in the provided query
      condition: The condition to satisfy to execute the action
      query_records: If ``False``, the records won't be passed as argument to the action.
          Default: ``True``
      interval_in_seconds: How often the listener is executed. Default to 30 seconds
class_docstr_tok: ["The","argilla","dataset","listener","class","Args",":","dataset",":","The","dataset","over","which","listener","is","created","action",":","The","action","to","execute","when","the","condition","is","satisfied","metrics",":","A","list","of","metrics","ids","that","will","be","required","in","condition","query",":","The","query","string","to","apply","query_params",":","Defined","parameters","used","dynamically","in","the","provided","query","condition",":","The","condition","to","satisfy","to","execute","the","action","query_records",":","If","``","False","``",",","the","records","wo","n't","be","passed","as","argument","to","the","action",".","Default",":","``","True","``","interval_in_seconds",":","How","often","the","listener","is","executed",".","Default","to","30","seconds"]
code: def __catch_exceptions__(self, cancel_on_failure=False):
      def catch_exceptions_decorator(job_func):
          @functools.wraps(job_func)
          def wrapper(*args, **kwargs):
              try:
                  return job_func(*args, **kwargs)
              except:  # noqa: E722
                  import traceback
  
                  print(traceback.format_exc())
                  if cancel_on_failure:
                      self.stop()  # We stop the scheduler
  
          return wrapper
  
      return catch_exceptions_decorator
  
imports: import copy
  import dataclasses
  import functools
  import logging
  import threading
  import time
  from typing import Any, Dict, List, Optional
  import schedule
  import argilla
  from argilla.client import singleton
  from argilla.client.sdk.commons.errors import NotFoundApiError
  from argilla.listeners.models import ListenerAction, ListenerCondition, Metrics, RGListenerContext, Search
label_desc: Use image node_id 5 for calling the RGDatasetListener obj's underlying member method code with example usage: obj.__catch_exceptions__(cancel_on_failure) and returns: catch_exceptions_decorator, wrapper, job_func