def METHOD_NAME(rbd, pool, image, snap, snap_rename, num_of_snaps):
    """
    Creates and renames multiple snapshots of a given image based on num_of_snaps specified
    Args:
        rbd: RBD object
        pool: pool name
        image: image name
        snap: snap prefix
        snap_rename: snap rename prefix
        num_of_snaps: number of snaps to be created
    """
    for i in range(1, num_of_snaps):
        snap_name_i = f"{snap}_{i}"
        if rbd.snap_create(pool, image, snap_name_i):
            log.error(f"Creation of snapshot {snap_name_i} failed")
            return 1
    for i in range(1, num_of_snaps):
        snap_name_i = f"{snap}_{i}"
        snap_rename_i = f"{snap_rename}_{i}"
        if rbd.snap_rename(pool, image, snap_name_i, snap_rename_i):
            log.error(f"Rename of snapshot {snap_name_i} to {snap_rename_i} failed")
            return 1
    return 0