def METHOD_NAME(self, datasets):
    def _left_pad_source(ds):
        if hasattr(ds, "left_pad_source"):
            return ds.left_pad_source
        if hasattr(ds, "dataset"):
            return _left_pad_source(ds.dataset)
        logger.warn(f"{type(ds)} has no left_pad_source, using default True")
        return True
    left_pad_source = _left_pad_source(datasets[0])
    for ds in datasets:
        if left_pad_source != _left_pad_source(ds):
            raise ValueError("Different left_pad_source setting detected!")
    return left_pad_source