def METHOD_NAME(self, n=1, left=False):
    """
    The trace of a ribbon diagram.
    Parameters:
        n : The number of wires to trace.
    """
    if not n:
        return self
    if left:
        return self.caps(self.dom[:n].r, self.dom[:n]) @ self.dom[n:]\
            >> self.dom[:n].r @ self\
            >> self.cups(self.cod[:n].r, self.cod[:n]) @ self.cod[n:]
    return self.dom[:-n] @ self.caps(self.dom[-n:], self.dom[-n:].r)\
        >> self @ self.dom[-n:].r\
        >> self.cod[:-n] @ self.cups(self.cod[-n:], self.cod[-n:].r)