def METHOD_NAME():
    class _command:
        calls = 0
        operation_complete = False
    def command():
        """Simulate service responding 404 a few times before 2xx"""
        assert not _command.operation_complete, "polling method shouldn't invoke the command after completion"
        if _command.calls < 3:
            _command.calls += 1
            raise ResourceNotFoundError()
        _command.operation_complete = True
    polling_method = DeleteRecoverPollingMethod(command, final_resource=None, finished=False)
    with mock.patch(SLEEP) as sleep:
        polling_method.run()
    assert sleep.call_count == _command.calls