

def Close(self):
    self._Send('CLSE', arg0=self.local_id, arg1=self.remote_id)
    (cmd, data) = self.ReadUntil('CLSE')
    if (cmd != 'CLSE'):
        if (cmd == 'FAIL'):
            raise usb_exceptions.AdbCommandFailureException('Command failed.', data)
        raise InvalidCommandError('Expected a CLSE response, got %s (%s)', cmd, data)

dataset/ETHPy150Open google/python-adb/adb/adb_protocol.py _AdbConnection.Close/original