def METHOD_NAME(self):
    if not self.target:
        return
    if self.assistant:
        self.assistant.METHOD_NAME()
    if self.disconnect or isinstance(self.target.platform, Gem5SimulationPlatform):
        self.logger.info('Disconnecting from the device')
        with signal.wrap('TARGET_DISCONNECT'):
            self.target.disconnect()