parameters: (*dargs, **dkw)
docstring: Decorator function that instantiates the Retrying object
      @param *dargs: positional arguments passed to Retrying object
      @param **dkw: keyword arguments passed to the Retrying object
docstring_summary: Decorator function that instantiates the Retrying object
docstring_tokens: Decorator function that instantiates the Retrying object
function: def retry(*dargs, **dkw):
      """
      Decorator function that instantiates the Retrying object
      @param *dargs: positional arguments passed to Retrying object
      @param **dkw: keyword arguments passed to the Retrying object
      """
      # support both @retry and @retry() as valid syntax
      if len(dargs) == 1 and callable(dargs[0]):
          def wrap_simple(f):
  
              @six.wraps(f)
              def wrapped_f(*args, **kw):
                  return Retrying().call(f, *args, **kw)
  
              return wrapped_f
  
          return wrap_simple(dargs[0])
  
      else:
          def wrap(f):
  
              @six.wraps(f)
              def wrapped_f(*args, **kw):
                  return Retrying(*dargs, **dkw).call(f, *args, **kw)
  
              return wrapped_f
  
          return wrap
function_tokens: def retry ( * dargs , * * dkw ) : # support both @retry and @retry() as valid syntax if len ( dargs ) == 1 and callable ( dargs [ 0 ] ) : def wrap_simple ( f ) : @ six . wraps ( f ) def wrapped_f ( * args , * * kw ) : return Retrying ( ) . call ( f , * args , * * kw ) return wrapped_f return wrap_simple ( dargs [ 0 ] ) else : def wrap ( f ) : @ six . wraps ( f ) def wrapped_f ( * args , * * kw ) : return Retrying ( * dargs , * * dkw ) . call ( f , * args , * * kw ) return wrapped_f return wrap