def METHOD_NAME(
    new_sample,
    factor,
    compression,
    htype,
    link_creds=None,
    sub_index=None,
    partial=False,
):
    new_sample = convert_sample_for_downsampling(new_sample, link_creds)
    if partial:
        for index_entry in sub_index.values:
            if not isinstance(index_entry.value, slice):
                return _NO_LINK_UPDATE
    downsampled = deeplake.util.downsample.downsample_sample(
        new_sample, factor, compression, htype, partial, link_creds
    )
    if partial:
        downsampled_sub_index = sub_index.downsample(factor, downsampled.shape)
        return downsampled_sub_index, downsampled
    return downsampled