code: def disconnect_sync(self, conn_id):
          
  
          done = threading.Event()
          result = {}
  
          def disconnect_done(conn_id, adapter_id, status, reason):
              result['success'] = status
              result['failure_reason'] = reason
              done.set()
  
          self.disconnect_async(conn_id, disconnect_done)
          done.wait()
  
          return result
docs: Synchronously disconnect from a connected device
  
          Args:
              conn_id (int): A unique identifier that will refer to this connection
  
          Returns:
              dict: A dictionary with two elements
                  'success': a bool with the result of the connection attempt
                  'failure_reason': a string with the reason for the failure if we failed