def METHOD_NAME(ceph_cluster, **kw):
    """
    Automates taking snapshots during re-balance test scenarios.
    1. Create replicated pool
    2. Identify the osd to be removed
    3. Fetch the host by daemon_type=osd and osd id
    4. Fetch container id and device path
    5. Mark osd out and wait for pgs to be active+clean
    6. Remove OSD
    7. Zap device and wait for device not present
    8. Add osd.
    9. Take pool snapshots and wait for device present and pgs to be active+clean
    10. Verify pool snapshots are present.
    """
    try:
        log.info(METHOD_NAME.__doc__)
        config = kw["config"]
        rhbuild = config.get("rhbuild")
        cephadm = CephAdmin(cluster=ceph_cluster, **config)
        rados_obj = RadosOrchestrator(node=cephadm)
        pool_obj = PoolFunctions(node=cephadm)
        client_node = ceph_cluster.get_nodes(role="client")[0]
        timeout = config.get("timeout", 10800)
        log.info("Running osd in progress rebalance tests")
        pool = create_pools(config, rados_obj, client_node)
        should_not_be_empty(pool, "Failed to retrieve pool details")
        write_to_pools(config, rados_obj, client_node)
        # Set recover threads configurations
        if not rhbuild.startswith("6"):
            rados_obj.change_recover_threads(config=pool, action="set")
        # Set mclock_profile
        if rhbuild.startswith("6") and config.get("mclock_profile"):
            rados_obj.set_mclock_profile(profile=config["mclock_profile"])
        acting_pg_set = rados_obj.get_pg_acting_set(pool_name=pool["pool_name"])
        log.info(f"Acting set {acting_pg_set}")
        should_not_be_empty(acting_pg_set, "Failed to retrieve acting pg set")
        osd_id = acting_pg_set[0]
        host = rados_obj.fetch_host_node(daemon_type="osd", daemon_id=osd_id)
        should_not_be_empty(host, "Failed to fetch host details")
        dev_path = get_device_path(host, osd_id)
        log.debug(
            f"osd1 device path  : {dev_path}, osd_id : {osd_id}, host.hostname : {host.hostname}"
        )
        utils.set_osd_devices_unmanaged(ceph_cluster, osd_id, unmanaged=True)
        method_should_succeed(utils.set_osd_out, ceph_cluster, osd_id)
        method_should_succeed(wait_for_clean_pg_sets, rados_obj, timeout)
        utils.osd_remove(ceph_cluster, osd_id)
        if pool.get("rados_put", False):
            do_rados_get(client_node, pool["pool_name"], 1)
        method_should_succeed(wait_for_clean_pg_sets, rados_obj)
        method_should_succeed(utils.zap_device, ceph_cluster, host.hostname, dev_path)
        method_should_succeed(wait_for_device, host, osd_id, action="remove")
        utils.add_osd(ceph_cluster, host.hostname, dev_path, osd_id)
        method_should_succeed(wait_for_device, host, osd_id, action="add")
        snapshots = []
        if pool.get("snapshot", "False"):
            for _ in range(pool.get("num_snaps", 1)):
                snap = pool_obj.create_pool_snap(pool.get("pool_name"))
                if snap:
                    snapshots.append(snap)
                else:
                    log.error("Could not create snapshot on the pool")
                    raise Exception("Could not create snapshot on the pool")
        method_should_succeed(wait_for_clean_pg_sets, rados_obj, timeout)
        write_to_pools(config, rados_obj, client_node)
        method_should_succeed(wait_for_clean_pg_sets, rados_obj, timeout)
        if pool.get("rados_put", False):
            do_rados_get(client_node, pool["pool_name"], 1)
        if pool.get("snapshot", "False"):
            log.info(f"Snapshots created are : {snapshots}")
            for snap_name in snapshots:
                if not pool_obj.check_snap_exists(
                    snap_name=snap_name, pool_name=pool["pool_name"]
                ):
                    log.error("Snapshot of pool does not exists")
                    raise Exception("Snapshot of pool does not exists")
                do_rados_snap_get(client_node, pool["pool_name"], 1, snap_name)
        utils.set_osd_devices_unmanaged(ceph_cluster, osd_id, unmanaged=False)
        rados_obj.change_recover_threads(config=pool, action="rm")
        if config.get("delete_pools"):
            for name in config["delete_pools"]:
                method_should_succeed(rados_obj.detete_pool, name)
            log.info("deleted all the given pools successfully")
        return 0
    except Exception as e:
        log.info(e)
        log.info(traceback.format_exc())
        return 1