code: def on_end_validation(self, state):
      try:
          if (
              len(self.predictions_list) == 1
              and type(self.predictions_list[0]) is torch.Tensor
          ):
              state[
                  torchbearer.FINAL_PREDICTIONS
              ] = self.predictions_list[0]
          else:
              state[torchbearer.FINAL_PREDICTIONS] = torch.cat(
                  self.predictions_list, 0
              )
      except:
          warnings.warn(
              "Failed to format predictions as tensor, returning as list."
          )
          state[torchbearer.FINAL_PREDICTIONS] = self.predictions_list
  
file_path: torchbearer/torchbearer/callbacks/aggregate_predictions.py
imports: import torchbearer
  from torchbearer.callbacks import Callback
  import torch
  import warnings
label_desc: Use image node_id 3 for calling the AggregatePredictions obj's underlying member method code with example usage: obj.on_end_validation(state) without return types