def METHOD_NAME(outputs):
    avg_loss = torch.stack([x['val_loss'] for x in outputs]).mean() \
        if len(outputs) > 0 else torch.tensor(float('inf'))
    tensorboard_logs = {'val_loss': avg_loss}
    return {'avg_val_loss': avg_loss, 'log': tensorboard_logs}