code: def test_follows_backoff_schedule(self, mock_time: MockTime):
      fn = mock.Mock(side_effect=MyError("oh no"))
      with pytest.raises(MyError):
          asyncio.run(
              retry.retry_async(
                  mock.Mock(
                      spec=retry.Backoff,
                      next_sleep_or_reraise=mock.Mock(
                          side_effect=[
                              1 * SECOND,
                              2 * SECOND,
                              MyError(),
                          ]
                      ),
                  ),
                  fn,
                  "pos1",
                  "pos2",
                  kw1="kw1",
                  kw2="kw2",
              )
          )
  
      mock_time.sleep_async.assert_has_calls(
          [
              mock.call(1.0),
              mock.call(2.0),
          ]
      )
  
      fn.assert_has_calls(
          [
              mock.call("pos1", "pos2", kw1="kw1", kw2="kw2"),
              mock.call("pos1", "pos2", kw1="kw1", kw2="kw2"),
              mock.call("pos1", "pos2", kw1="kw1", kw2="kw2"),
          ]
      )
  
imports: import asyncio
  import dataclasses
  import datetime
  from typing import Iterator
  from unittest import mock
  import pytest
  from wandb.sdk.lib import retry
label_desc: Use image node_id 1 for calling the TestRetryAsync obj's underlying member method code with example usage: obj.test_follows_backoff_schedule(mock_time) without return types