def resolve(self, piper, forgive=False):
try:<EOL><INDENT>if piper in self:<EOL><INDENT>resolved = piper<EOL><DEDENT>else:<EOL><INDENT>resolved = [p for p in self if id(p) == piper][<NUM_LIT:0>]<EOL><DEDENT><DEDENT>except (TypeError, IndexError):<EOL><INDENT>resolved = False<EOL><DEDENT>if resolved:<EOL><INDENT>self.log.debug('<STR_LIT>' % (repr(self), piper))<EOL><DEDENT>else:<EOL><INDENT>self.log.debug('<STR_LIT>' %(repr(self), repr(piper)))<EOL>if not forgive:<EOL><INDENT>raise DaggerError('<STR_LIT>' %(repr(self), repr(piper)))<EOL><DEDENT>resolved = False<EOL><DEDENT>return resolved<EOL>
Given a ``Piper`` instance or the ``id`` of the ``Piper``. Returns the
``Piper`` instance if it can be resolved else raises a ``DaggerError`` 
or returns ``False`` depending on the "forgive" argument. 

Arguments:

- piper(``Piper`` or id(``Piper``)) a ``Piper`` instance or its id to be
  found in the ``Dagger``. 
- forgive(``bool``) [default: ``False``] If "forgive" is ``False`` a 
  ``DaggerError`` is raised whenever a  ``Piper`` cannot be resolved in 
  the ``Dagger``. If "forgive" is ``True`` then ``False`` is returned.