code: def get_action(policy, obs):
      """Get an action by evaluating a given policy."""
      dtype = chainer.get_dtype()
      obs = policy.xp.asarray(obs[None], dtype=dtype)
      with chainer.no_backprop_mode():
          action = policy(obs).array[0]
      return chainer.backends.cuda.to_cpu(action)
  
imports: from __future__ import division
  import argparse
  import collections
  import copy
  import random
  import warnings
  import gym
  import numpy
  import chainer
  from chainer import functions
  from chainer import links
  from chainer import optimizers
label_desc: Use image node_id 2 for calling a global function with example usage: get_action(policy, obs) and returns: chainer