def METHOD_NAME(rbd, pool_type, **kw):
    """
    Run rbd_compression_hint test on supported options,
    i.e compressible and incompressible.
    Args:
        rbd: RBD object
        pool_type: pool type (ec_pool_config or rep_pool_config)
        **kw: test data
    Returns:
        int: The return value. 0 for success, 1 for failure.
    """
    config = kw.get("config")
    pool_name = config[pool_type]["pool"]
    compression_configs = {
        "compression_algorithm": config.get("compression_algorithm"),
        "compression_mode": config.get("compression_mode"),
        "compression_required_ratio": config.get("compression_ratio"),
    }
    try:
        # set bluestore_compression_mode to passive
        set_ceph_config(rbd, "osd", "bluestore_compression_mode", "passive")
        if (
            get_ceph_config(
                rbd, "osd", "bluestore_compression_mode", output=True
            ).strip()
            != "passive"
        ):
            log.error("Not able to set bluestore_compression_mode to passive")
            return 1
        log.info("bluestore_compression_mode set to passive successfully")
        # commands to set compression related configuration
        rbd.exec_cmd(
            cmd=" && ".join(
                [
                    f"ceph osd pool set {pool_name} {k} {v}"
                    for k, v in compression_configs.items()
                ]
            )
        )
        for option in ["compressible", "incompressible"]:
            # set rbd_compression_hint on global, pool and image level
            for level in ["global", "pool", "image"]:
                image_name = rbd.random_string() + "_test_image"
                # creating separate image for each level to validate compression
                rbd.create_image(
                    pool_name,
                    image_name,
                    size="10G",
                )
                image_spec = pool_name + "/" + image_name
                entity = {"global": "global", "pool": pool_name, "image": image_spec}
                rbd.set_config(level, entity[level], "rbd_compression_hint", option)
                if (
                    rbd.get_config(
                        level, entity[level], "rbd_compression_hint", output=True
                    ).strip()
                    != option
                ):
                    log.error(
                        f"Not able to set rbd_compression_hint on {option} mode in {level} level"
                    )
                    return 1
                log.info(
                    f"Able to set rbd_compression_hint on {option} mode in {level} level"
                )
                validate_compression(rbd, option, image_spec, **kw)
                # remove rbd_compression_hint on each level
                rbd.remove_config(level, entity[level], "rbd_compression_hint")
                out, err = rbd.get_config(
                    level, entity[level], "rbd_compression_hint", all=True
                )
                log.debug(err)
                if "rbd: rbd_compression_hint is not set" not in str(err):
                    log.error(
                        f"Not able to remove rbd_compression_hint on {option} mode in {level} level"
                    )
                    return 1
                log.info(
                    f"Able to remove rbd_compression_hint on {option} mode in {level} level"
                )
                # deleting the image to test other levels with new image
                # otherwise older compressed data got retained the same info.
                rbd.remove_image(pool_name, image_name)
        return 0
    except Exception as error:
        log.error(str(error))
        return 1
    finally:
        rbd.clean_up(pools=[kw["config"][pool_type]["pool"]])