def METHOD_NAME(dut, pname, state, iteration=20, delay=2):
    """
    To verify warm restart state poll.
    Author : Prudvi Mangadu (prudvi.mangadu@broadcom.com)
    :param dut:
    :param pname:
    :param state:
    :param iteration:
    :param delay:
    :return:
    """
    itercount = 1
    while True:
        if verify_warm_restart(dut, mode='state', name=pname, state=state):
            return True
        if itercount > iteration:
            st.error("For warm restart {}:{} status verification max iteration count {} reached".format(pname, state,
                                                                                                        itercount))
            return False
        itercount += delay
        st.wait(delay)