class_docstr: Agent of Cartpole env.
  
  Args:
      algorithm(parl.Algorithm): algorithm used to solve the problem.
docstr: Predict an action when given an observation
  
  Args:
      obs(np.float32): shape of (obs_dim,)
  
  Returns:
      act(int): action
code: def predict(self, obs):
      """Predict an action when given an observation
  
      Args:
          obs(np.float32): shape of (obs_dim,)
  
      Returns:
          act(int): action
      """
      obs = paddle.to_tensor(obs, dtype="float32")
      prob = self.alg.predict(obs)
      act = int(prob.argmax())
      return act
  
file_path: PARL/examples/QuickStart/cartpole_agent.py
imports: import parl
  import paddle
  import numpy
label_desc: Use image node_id 3 for calling the CartpoleAgent obj's underlying member method code with example usage: obj.predict(obs) and returns: act