def METHOD_NAME(local_ds, cat_path):
    with local_ds as ds:
        ds.create_tensor(
            "image", htype="link[image]", sample_compression="jpeg", downsampling=(2, 7)
        )
        tensors = set(ds._tensors(include_hidden=True).keys())
        downsampled_tensors = [
            "image",
            "_image_downsampled_2",
            "_image_downsampled_4",
            "_image_downsampled_8",
            "_image_downsampled_16",
            "_image_downsampled_32",
            "_image_downsampled_64",
            "_image_downsampled_128",
        ]
        assert tensors.issuperset(downsampled_tensors)
        for tensor in downsampled_tensors[1:]:
            assert ds[tensor].info["downsampling_factor"] == 2
        ds.image.append(deeplake.link(cat_path))
        cats = [ds[tensor][0].numpy() for tensor in downsampled_tensors]
        expected_shapes = [
            (900, 900, 3),
            (450, 450, 3),
            (225, 225, 3),
            (112, 112, 3),
            (56, 56, 3),
            (28, 28, 3),
            (14, 14, 3),
            (0, 0, 0),
        ]
        for cat, shape in zip(cats, expected_shapes):
            assert cat.shape == shape