code: def after_batch(self, stream_name: str, batch_data) -> None:
          
  
          if self._after_batch:
              self._check_nan({stream_name: batch_data})
docs: If initialized to check after each batch, stop the training once the batch data contains a monitored
          variable equal to NaN.
  
          :param stream_name: name of the stream to be checked
          :param batch_data: batch data to be checked