@record_history
def disconnect(self, a, b=None, source=True, destination=True):
    'Disconnect `a` from `b`\n\n        Arguments:\n            a (Plug): Starting point of a connection\n            b (Plug, optional): End point of a connection, defaults to all\n            source (bool, optional): Disconnect b, if it is a source\n            source (bool, optional): Disconnect b, if it is a destination\n\n        Normally, Maya only performs a disconnect if the\n        connection is incoming. Bidirectional\n\n        disconnect(A, B) => OK\n         __________       _________\n        |          |     |         |\n        |  nodeA   o---->o  nodeB  |\n        |__________|     |_________|\n\n        disconnect(B, A) => NO\n         __________       _________\n        |          |     |         |\n        |  nodeA   o---->o  nodeB  |\n        |__________|     |_________|\n\n        '
    if isinstance(a, Plug):
        a = a._mplug
    if isinstance(b, Plug):
        b = b._mplug
    if (b is None):
        if source:
            for plug in a.connectedTo(True, False):
                self._modifier.disconnect(plug, a)
        if destination:
            for plug in a.connectedTo(False, True):
                self._modifier.disconnect(a, plug)
    else:
        if source:
            self._modifier.disconnect(a, b)
        if destination:
            self._modifier.disconnect(b, a)
Disconnect `a` from `b`

Arguments:
    a (Plug): Starting point of a connection
    b (Plug, optional): End point of a connection, defaults to all
    source (bool, optional): Disconnect b, if it is a source
    source (bool, optional): Disconnect b, if it is a destination

Normally, Maya only performs a disconnect if the
connection is incoming. Bidirectional

disconnect(A, B) => OK
 __________       _________
|          |     |         |
|  nodeA   o---->o  nodeB  |
|__________|     |_________|

disconnect(B, A) => NO
 __________       _________
|          |     |         |
|  nodeA   o---->o  nodeB  |
|__________|     |_________|
@record_history
def disconnect(self, a, b=None, source=True, destination=True):
    'Disconnect `a` from `b`\n\n        Arguments:\n            a (Plug): Starting point of a connection\n            b (Plug, optional): End point of a connection, defaults to all\n            source (bool, optional): Disconnect b, if it is a source\n            source (bool, optional): Disconnect b, if it is a destination\n\n        Normally, Maya only performs a disconnect if the\n        connection is incoming. Bidirectional\n\n        disconnect(A, B) => OK\n         __________       _________\n        |          |     |         |\n        |  nodeA   o---->o  nodeB  |\n        |__________|     |_________|\n\n        disconnect(B, A) => NO\n         __________       _________\n        |          |     |         |\n        |  nodeA   o---->o  nodeB  |\n        |__________|     |_________|\n\n        '
    if isinstance(a, Plug):
        a = a._mplug
    if isinstance(b, Plug):
        b = b._mplug
    if (b is None):
        if source:
            for plug in a.connectedTo(True, False):
                self._modifier.disconnect(plug, a)
        if destination:
            for plug in a.connectedTo(False, True):
                self._modifier.disconnect(a, plug)
    else:
        if source:
            self._modifier.disconnect(a, b)
        if destination:
            self._modifier.disconnect(b, a)