docs: async def try_sending(self,msg,timeout_secs, max_attempts):
          """Coroutine used to send message to the device when a response or ack is needed.
  
          This coroutine will try to send up to max_attempts time the message, waiting timeout_secs
          for an answer. If no answer is received, it will consider that the device is no longer
          accessible and will unregister it.
  
              :param msg: The message to send
              :type msg: aiolifx.Message
              :param timeout_secs: Number of seconds to wait for a response or ack
              :type timeout_secs: int
              :param max_attempts: .
              :type max_attempts: int
              :returns: a coroutine to be scheduled
              :rtype: coroutine
          """
          if timeout_secs is None:
              timeout_secs = self.timeout
          if max_attempts is None:
              max_attempts = self.retry_count
  
          attempts = 0
          while attempts < max_attempts:
              if msg.seq_num not in self.message: return
              event = aio.Event()
              self.message[msg.seq_num][1]= event
              attempts += 1
              if self.transport:
                  self.transport.sendto(msg.packed_message)
              try:
                  myresult = await aio.wait_for(event.wait(),timeout_secs)
                  break
              except Exception as inst:
                  if attempts >= max_attempts:
                      if msg.seq_num in self.message:
                          callb = self.message[msg.seq_num][2]
                          if callb:
                              callb(self, None)
                          del(self.message[msg.seq_num])
                      #It's dead Jim
                      self.unregister()