docs: def assert_order_met(self, finalize=False):
          """assert that calls have been made in the right order."""
          error = None
          actual_call_len = len(self._actual_calls)
          expected_call_len = len(self._call_order)
  
          if actual_call_len == 0:
              error = "Not enough calls were made"
          else:
              for i,call in enumerate(self._call_order):
                  if actual_call_len < i+1:
                      if not finalize:
                          # we're not done asserting calls so
                          # forget about not having enough calls
                          continue
  
                      calls_made = len(self._actual_calls)
                      if calls_made == 1:
                          error = "Only 1 call was made"
                      else:
                          error = "Only %s calls were made" % calls_made
                      break
  
                  ac_call = self._actual_calls[i]
                  if ac_call is not call:
                      error = "Call #%s was %r" % (i+1, ac_call)
                      break
  
              if not error:
                  if actual_call_len > expected_call_len:
                      # only show the first extra call since this
                      # will be triggered before all calls are finished:
                      error = "#%s %s was unexpected" % (
                          expected_call_len+1,
                          self._actual_calls[expected_call_len]
                      )
  
          if error:
              msg = "%s; Expected: %s" % (
                      error, self._repr_call_list(self._call_order))
              raise AssertionError(msg)