def METHOD_NAME(ds):
    if hasattr(ds, "left_pad_source"):
        return ds.left_pad_source
    if hasattr(ds, "dataset"):
        return METHOD_NAME(ds.dataset)
    logger.warn(f"{type(ds)} has no left_pad_source, using default True")
    return True