code: def _isPromise(obj):
      
      return hasattr(obj, "fulfill") and \
          _isFunction(getattr(obj, "fulfill")) and \
          hasattr(obj, "reject") and \
          _isFunction(getattr(obj, "reject")) and \
          hasattr(obj, "then") and \
          _isFunction(getattr(obj, "then"))
docs: A utility function to determine if the specified
      object is a promise using "duck typing".