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