code: def pause_knocks(obj):
      
      if not hasattr(_thread_locals, 'knock_enabled'):
          _thread_locals.knock_enabled = {}
      obj.__class__._disconnect()
      _thread_locals.knock_enabled[obj.__class__] = False
      yield
      _thread_locals.knock_enabled[obj.__class__] = True
      obj.__class__._connect()
docs: Context manager to suspend sending knocks for the given model
  
      :param obj: model instance