code: public static NoResponseListener getInstance(Batcher batcher) {
      if ( batcher instanceof WriteBatcher ) {
        WriteFailureListener[] writeFailureListeners = ((WriteBatcher) batcher).getBatchFailureListeners();
        for (WriteFailureListener writeFailureListener : writeFailureListeners) {
          if ( writeFailureListener instanceof NoResponseListener ) {
            return (NoResponseListener) writeFailureListener;
          }
        }
      } else if ( batcher instanceof QueryBatcher ) {
        QueryFailureListener[] queryFailureListeners = ((QueryBatcher) batcher).getQueryFailureListeners();
        for (QueryFailureListener queryFailureListener : queryFailureListeners) {
          if ( queryFailureListener instanceof NoResponseListener ) {
            return (NoResponseListener) queryFailureListener;
          }
        }
      } else {
        throw new IllegalStateException(
            "The Batcher should be either a QueryBatcher instance or a WriteBatcher instance");
      }
      return null;
    }
docs: Returns the NoResponseListener instance registered with the Batcher.
  
  @param batcher the Batcher instance for which the registered
  NoResponseListener is returned
  @return the NoResponseListener instance with the batcher or null if there
  is no NoResponseListener registered
  @throws IllegalStateException if the passed Batcher is neither a
  QueryBatcher nor a WriteBatcher