code: def _sendMsg(self, msg):
      
      if not self.sock:
        self.connect()
      if not isinstance(msg, binary_type):
        msg = msg.encode("UTF-8")
  
      backoff = 0.001
      while True:
        try:
          self.sock.sendall(msg)
          break
        except socket.error:
          log.warning('Graphite connection error', exc_info = True)
          self.disconnect()
          time.sleep(random.uniform(0, 2.0*backoff))
          backoff = min(backoff*2.0, 5.0)
          self.connect()
docs: Send a line to graphite. Retry with exponential backoff.