def METHOD_NAME(self, samples):
    """Merge a list of samples to form a mini-batch."""
    if len(samples) == 0:
        return None
    if self.eval_key is None:
        return OrderedDict(
            [
                (key, dataset.METHOD_NAME([sample[key] for sample in samples]))
                for key, dataset in self.datasets.items()
            ]
        )
    else:
        # at evaluation time it's useful to pass-through batches from a single key
        return self.datasets[self.eval_key].METHOD_NAME(samples)