code: def send_state(self, key=None):
          
          state = self.get_state(key=key)
          if len(state) > 0:
              if self._property_lock:  # we need to keep this dict up to date with the front-end values
                  for name, value in state.items():
                      if name in self._property_lock:
                          self._property_lock[name] = value
              state, buffer_paths, buffers = _remove_buffers(state)
              msg = {'method': 'update', 'state': state, 'buffer_paths': buffer_paths}
              self._send(msg, buffers=buffers)
docs: Sends the widget state, or a piece of it, to the front-end, if it exists.
  
          Parameters
          ----------
          key : unicode, or iterable (optional)
              A single property's name or iterable of property names to sync with the front-end.