code: def update_config(self, config):
          
  
          # do not allow updating config simultaneously
          lock = Lock()
          with lock:
              # TODO: keep the stream alive.
              # The stream is terminated after iteration completes.
              # To keep it alive, we can enqueue proto configs here
              # and asyncronously read them and send to the agent.
              config_responses = self.client.Config(
                  self.generate_config_request(config))
  
              agent_config = next(config_responses)
              return agent_config
docs: Sends TraceConfig to the agent and gets agent's config in reply.
  
          :type config: `~opencensus.proto.trace.v1.TraceConfig`
          :param config: Trace config with sampling and other settings
  
          :rtype: `~opencensus.proto.trace.v1.TraceConfig`
          :returns: Trace config from agent.