def METHOD_NAME():
   global Err_flag
   timeout = 500
   while Ack_flag and Err_flag == False and timeout > 0:
      time.sleep(0.01)
      timeout = timeout -1
   if 0 == timeout:
      print("Error: Timeout")
      Err_flag = True
   return Ack_flag