code: def __init__(
      self,
      max_calls_before_failure=2,
      exception_to_raise=pymongo.errors.AutoReconnect,
      **kwargs,
  ):
      super().__init__(**kwargs)
      self._max_calls_before_failure = max_calls_before_failure
      self.exception_to_raise = exception_to_raise
      self._exception_to_raise = exception_to_raise
  
imports: import mongomock
  import pymongo
  import pymongo.errors
label_desc: Use image node_id 1 to create a new FailingMongoClient object from inherited base classes: mongomock with example: obj = FailingMongoClient(max_calls_before_failure, exception_to_raise)