code: def func_takes_last_result(waiter):
      
      if not six.callable(waiter):
          return False
      if not inspect.isfunction(waiter) and not inspect.ismethod(waiter):
          # waiter is a class, check dunder-call rather than dunder-init.
          waiter = waiter.__call__
      waiter_spec = _utils.getargspec(waiter)
      return 'last_result' in waiter_spec.args
docs: Check if function has a "last_result" parameter.
  
      Needed to provide backward compatibility for wait functions that didn't
      take "last_result" in the beginning.