code: def update_endpoint(self, updated_ed):
          
          endpoint_id = updated_ed.get_id()
          with self._published_endpoints_lock:
              if self.get_advertised_endpoint(endpoint_id) is None:
                  return False
  
              advertise_result = self._update(updated_ed)
              if advertise_result:
                  self._remove_advertised(endpoint_id)
                  self._add_advertised(updated_ed, advertise_result)
                  return True
  
              return False
docs: Update a previously advertised endpoint_description.
  
          :param endpoint_description: an instance of EndpointDescription to
          update. Must not be None.
          :return: True if advertised, False if not
          (e.g. it's already been advertised)