docstr: Implement Send function in SimulatorServicer
  Everytime a request coming, will create a new thread to handle
code: def Send(self, request, context):
      """Implement Send function in SimulatorServicer
      Everytime a request coming, will create a new thread to handle
      """
      ident, obs, reward, done, info = (
          request.id,
          request.observation,
          request.reward,
          request.done,
          request.info,
      )
      client = self.clients[ident]
      info = json.loads(info)
  
      if "first" in info:
          # Waiting training thread to allow start new episode
          self._new_ready_client()
  
      obs = np.array(obs, dtype=np.float32)
      self._process_msg(ident, obs, reward, done, info)
  
      if done:
          # Waiting training thread to allow start new episode
          self._new_ready_client()
  
      action = self.pred_batch(obs, client.model_idx)
      step = len(client.memory) - client.last_target_changed
  
      # whether to add noise depends on the ensemble_num
      if args.ensemble_num == 1:
          current_noise = self.noiselevel * (0.98 ** (step - 1))
          noise = np.zeros((ACT_DIM,), dtype=np.float32)
          if ident % 3 == 0:
              if step % 5 == 0:
                  noise = np.random.randn(ACT_DIM) * current_noise
          elif ident % 3 == 1:
              if step % 5 == 0:
                  noise = np.random.randn(ACT_DIM) * current_noise * 2
          action += noise
      action = np.clip(action, -1, 1)
      client.memory[-1].action = action
      extra_info = {}
      return simulator_pb2.Reply(
          action=action, extra=json.dumps(extra_info)
      )
  
imports: import grpc
  import json
  import numpy
  import os
  import queue
  import simulator_pb2
  import simulator_pb2_grpc
  import six
  import time
  import threading
  from args import get_server_args
  from collections import defaultdict
  from concurrent import futures
  from multi_head_ddpg import MultiHeadDDPG
  from opensim_agent import OpenSimAgent
  from opensim_model import OpenSimModel
  from parl.utils import logger
  from replay_memory import ReplayMemory
  from utils import calc_indicators, ScalarsManager, TransitionExperience
label_desc: Use image node_id 3 for calling the SimulatorServer obj's underlying member method code with example usage: obj.Send(request, context) and returns: simulator_pb2