code: def debug_command(self, cmd, args=None, progress_callback=None):
          
  
          if args is None:
              args = {}
  
          try:
              self._on_progress = progress_callback
              return self._loop.run_coroutine(self.adapter.debug(0, cmd, args))
          finally:
              self._on_progress = None
docs: Send a debug command to the connected device.
  
          This generic method will send a named debug command with the given
          arguments to the connected device.  Debug commands are typically used
          for things like forcible reflashing of firmware or other, debug-style,
          operations.  Not all transport protocols support debug commands and
          the supported operations vary depeneding on the transport protocol.
  
          Args:
              cmd (str): The name of the debug command to send.
              args (dict): Any arguments required by the given debug command
              progress_callback (callable): A function that will be called periodically to
                  report progress.  The signature must be callback(done_count, total_count)
                  where done_count and total_count will be passed as integers.
  
          Returns:
              object: The return value of the debug command, if there is one.