def add_piper(self, piper, xtra=None, create=True, branch=None):
self.log.debug('<STR_LIT>' % (repr(self), piper))<EOL>piper = (self.resolve(piper, forgive=True) or piper)<EOL>if not isinstance(piper, Piper):<EOL><INDENT>if create:<EOL><INDENT>try:<EOL><INDENT>piper = Piper(piper)<EOL><DEDENT>except PiperError:<EOL><INDENT>self.log.error('<STR_LIT>' %(repr(self), repr(piper)))<EOL>raise DaggerError('<STR_LIT>' %(repr(self), repr(piper)))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.log.error('<STR_LIT>' %(repr(self), repr(piper)))<EOL>raise DaggerError('<STR_LIT>' %(repr(self), repr(piper)))<EOL><DEDENT><DEDENT>new_piper_created = self.add_node(piper, xtra, branch)<EOL>if new_piper_created:<EOL><INDENT>self.log.debug('<STR_LIT>' % (repr(self), piper))<EOL><DEDENT>return (new_piper_created, piper)<EOL>
Adds a ``Piper`` instance to this ``Dagger``, but only if the ``Piper`` 
is not already there. Optionally creates a new ``Piper`` if the "piper"
argument is valid for the ``Piper`` constructor. Returns a ``tuple``
(new_piper_created, piper_instance) indicating whether a new ``Piper`` 
has been created and the instance of the added ``Piper``. Optionally 
takes "branch" and "xtra" arguments for the topological node in the 
graph.

Arguments:

  - piper(``Piper``, ``Worker`` or id(``Piper``)) ``Piper`` instance or 
    object which will be converted to a ``Piper`` instance.
  - create(``bool``) [default: ``True``] Should a new ``Piper`` be 
    created if "piper" cannot be resolved in this ``Dagger``?
  - xtra(``dict``) [default: ``None``] Dictionary of  ``graph.Node``  
    properties.