def METHOD_NAME(self, observation, context):
    """Receive Obs proto and send back an Action."""
    if self.actor_func is None:
        print("Actor is not initialized")
        return
    if isinstance(self.obs_space, gym.spaces.Tuple):
        obs = [observation.discrete, observation.continuous]
    elif isinstance(self.obs_space, gym.spaces.Box):
        obs = observation.continuous
    else:
        obs = observation.discrete
    action = self.actor_func(obs)
    if not isinstance(action, collections.Iterable):
        action = [action]
    if isinstance(self.act_space, gym.spaces.Box):
        action_proto = OpenAI_pb2.Action(continuous=action, done=False)
    elif isinstance(self.act_space, gym.spaces.Tuple):
        action_proto = OpenAI_pb2.Action(discrete=action[0].astype(int),
                                         continuous=action[1], done=False)
    else:
        action_proto = OpenAI_pb2.Action(discrete=action, done=False)
    return action_proto