def METHOD_NAME(self, input_params, expected_avg, details_shape):
    dice_metric = MeanDice(num_classes=2, **input_params)
    def _val_func(engine, batch):
        pass
    engine = Engine(_val_func)
    dice_metric.attach(engine=engine, name="mean_dice")
    # test input a list of channel-first tensor
    y_pred = [torch.Tensor([[1]]), torch.Tensor([[0]])]
    y = torch.Tensor([[[0], [1]], [[0], [1]]])
    engine.state.output = {"pred": y_pred, "label": y}
    engine.fire_event(Events.ITERATION_COMPLETED)
    y_pred = [torch.Tensor([[1]]), torch.Tensor([[0]])]  # class indices y_pred
    y = torch.Tensor([[[1]], [[0]]])  # class indices y
    engine.state.output = {"pred": y_pred, "label": y}
    engine.fire_event(Events.ITERATION_COMPLETED)
    engine.fire_event(Events.EPOCH_COMPLETED)
    assert_allclose(engine.state.metrics["mean_dice"], expected_avg, atol=1e-4, rtol=1e-4, type_test=False)
    self.assertTupleEqual(tuple(engine.state.metric_details["mean_dice"].shape), details_shape)