def METHOD_NAME(rbd_mirror, pool_type, **kw):
    """
    Test to verify parent snapshot deletion of a clone having a snapshot on the mirrored image
    Args:
        rbd_mirror: rbd mirror object
        pool_type: ec pool or rep pool
        **kw: test data containing pool name, image name and other details
    Returns:
        0 if test pass, else 1
    """
    try:
        mirror1 = rbd_mirror.get("mirror1")
        mirror2 = rbd_mirror.get("mirror2")
        config = kw.get("config")
        pool = config[pool_type]["pool"]
        image = config[pool_type]["image"]
        imagespec = pool + "/" + image
        snap_1 = kw["config"][pool_type].get("snap", f"{image}_snap")
        clone_1 = kw["config"][pool_type].get("clone", f"{image}_clone")
        rbd1, rbd2 = [
            Rbd(**kw, req_cname=cluster_name)
            for cluster_name in kw.get("ceph_cluster_dict").keys()
        ]
        mirror2.wait_for_replay_complete(imagespec)
        if rbd1.snap_create(pool, image, snap_1):
            log.error(f"Snapshot with name {snap_1} creation failed for {image}")
            return 1
        snap_name_1 = f"{pool}/{image}@{snap_1}"
        if rbd1.protect_snapshot(snap_name_1):
            log.error(f"Snapshot protect failed for {pool}/{image}")
            return 1
        if rbd1.create_clone(snap_name_1, pool, clone_1):
            log.error(f"Clone creation failed for {pool}/{clone_1}")
            return 1
        # verify in secondary for clone mirror
        imagespec2 = pool + "/" + clone_1
        mirror1.wait_for_status(imagespec=imagespec2, state_pattern="up+stopped")
        mirror2.wait_for_replay_complete(imagespec2)
        if mirror2.image_exists(imagespec2):
            log.error(f"No such image info found for {imagespec2}")
            return 1
        mirror2.wait_for_status(imagespec=imagespec2, state_pattern="up+replaying")
        # delete parent snap while running io's in image
        with parallel() as p:
            p.spawn(
                mirror1.benchwrite, imagespec=imagespec, io=config.get("io_total", "1G")
            )
            p.spawn(
                flatten_unprotect_delete_snap,
                rbd1,
                pool,
                image,
                clone_1,
                snap_1,
                snap_name_1,
            )
        # Verify for parent snapshot deletion
        if snap_1 in rbd1.snap_ls(pool_name=pool, image_name=image, snap_name=snap_1):
            log.info(f"parent snapshot {snap_1} is not removed as expected")
            return 1
        log.info(f"parent snapshot {snap_1} is removed successfully")
        # verify creating snapshot in secondary cluster
        snap_2 = kw["config"][pool_type].get("snap", f"{image}_snap2")
        if rbd2.snap_create(pool, image, snap_2):
            log.info(
                "As expected Snapshot creation failed due to image lock in primary cluster"
            )
            return 0
    except Exception as e:
        log.exception(e)
        return 1
    # Cleans up the configuration
    finally:
        mirror1.clean_up(peercluster=mirror2, pools=[pool])