def METHOD_NAME(self):
    """attach/detach + dedicated bearer test in loop with a single UE"""
    num_ues = 1
    loop = 3
    self._s1ap_wrapper.configUEDevice(num_ues)
    for _ in range(num_ues):
        req = self._s1ap_wrapper.ue_req
        print(
            "********************* Running End to End attach for ",
            "UE id ",
            req.ue_id,
        )
        # Now actually complete the attach
        attach = self._s1ap_wrapper._s1_util.attach(
            req.ue_id,
            s1ap_types.tfwCmd.UE_END_TO_END_ATTACH_REQUEST,
            s1ap_types.tfwCmd.UE_ATTACH_ACCEPT_IND,
            s1ap_types.ueAttachAccept_t,
        )
        addr = attach.esmInfo.pAddr.addrInfo
        default_ip = ipaddress.ip_address(bytes(addr[:4]))
        # Wait on EMM Information from MME
        self._s1ap_wrapper._s1_util.receive_emm_info()
        for j in range(loop):
            time.sleep(2)
            print("*************************************************")
            print("********************* Iteration - ", j + 1)
            print("*************************************************")
            print(
                "***************** Adding dedicated bearer to IMSI",
                "".join([str(i) for i in req.imsi]),
            )
            # Create default flow list
            flow_list = self._spgw_util.create_default_ipv4_flows()
            self._spgw_util.create_bearer(
                "IMSI" + "".join([str(i) for i in req.imsi]),
                attach.esmInfo.epsBearerId,
                flow_list,
            )
            response = self._s1ap_wrapper.s1_util.get_response()
            assert response.msg_type == s1ap_types.tfwCmd.UE_ACT_DED_BER_REQ.value
            act_ded_ber_ctxt_req = response.cast(
                s1ap_types.UeActDedBearCtxtReq_t,
            )
            self._s1ap_wrapper.sendActDedicatedBearerAccept(
                req.ue_id, act_ded_ber_ctxt_req.bearerId,
            )
            print("Sleeping for 5 seconds")
            time.sleep(5)
            # Verify if flow rules are created
            dl_flow_rules = {
                default_ip: [flow_list],
            }
            # 1 UL flow for default bearer + 1 for dedicated bearer
            num_ul_flows = 2
            self._s1ap_wrapper.s1_util.verify_flow_rules(
                num_ul_flows, dl_flow_rules,
            )
            print(
                "*************** Deleting dedicated bearer for IMSI",
                "".join([str(i) for i in req.imsi]),
            )
            self._spgw_util.delete_bearer(
                "IMSI" + "".join([str(i) for i in req.imsi]),
                attach.esmInfo.epsBearerId,
                act_ded_ber_ctxt_req.bearerId,
            )
            response = self._s1ap_wrapper.s1_util.get_response()
            assert response.msg_type == s1ap_types.tfwCmd.UE_DEACTIVATE_BER_REQ.value
            print("************** Received deactivate eps bearer context")
            deactv_bearer_req = response.cast(
                s1ap_types.UeDeActvBearCtxtReq_t,
            )
            self._s1ap_wrapper.sendDeactDedicatedBearerAccept(
                req.ue_id, deactv_bearer_req.bearerId,
            )
            print("Sleeping for 5 seconds")
            time.sleep(5)
            # Verify if flow rule is deleted for dedicated bearer
            dl_flow_rules = {
                default_ip: [],
            }
            # 1 UL flow for default bearer
            num_ul_flows = 1
            self._s1ap_wrapper.s1_util.verify_flow_rules(
                num_ul_flows, dl_flow_rules,
            )
        print(
            "********************** Running UE detach for UE id ",
            req.ue_id,
        )
        # Now detach the UE
        self._s1ap_wrapper.s1_util.detach(
            req.ue_id, s1ap_types.ueDetachType_t.UE_NORMAL_DETACH.value,
        )