def with_known_args(self, **kwargs):
    """Send only known keyword-arguments to the phase when called."""
    argspec = inspect.getargspec(self.func)
    stored = {}
    for key, arg in six.iteritems(kwargs):
      if key in argspec.args or argspec.keywords:
        stored[key] = arg
    if stored:
      return self.with_args(**stored)
    return self
def with_known_args ( self , ** kwargs ) : argspec = inspect . getargspec ( self . func ) stored = { } for key , arg in six . iteritems ( kwargs ) : if key in argspec . args or argspec . keywords : stored [ key ] = arg if stored : return self . with_args ( ** stored ) return self
Send only known keyword-arguments to the phase when called.