code: def check_window_based_predictions(predictions, last_predictions):
      if predictions is None or np.all(
          [predictions[i] is None for i in range(predictions.shape[0])]
      ):
          raise ValueError("Predictions must not be None!")
      elif (
          last_predictions is not None
          and predictions.shape[0] != last_predictions.shape[0]
      ):
          raise ValueError(
              f"Predictions must not differ in size: "
              f"Current {predictions.shape[0]} / Previous {last_predictions.shape[0]}"
          )
  
file_path: small-text/small_text/stopping_criteria/base.py
imports: import numpy
  from abc import ABC, abstractmethod
label_desc: Use image node_id 1 for calling a global function with example usage: check_window_based_predictions(predictions, last_predictions) without return types