code: def get_action(self, state: np.ndarray, **kwargs) -> int:
      threshold: float = kwargs.get("threshold", 0)
  
      rand = random.random()
  
      if rand < threshold:
          return np.random.choice(self.n_actions)
      else:
          return np.argmax(
              self.policy_network(np.expand_dims(state, 0))
          )
  
file_path: tensortrade/tensortrade/agents/parallel/parallel_dqn_model.py
imports: from deprecated import deprecated
  import random
  import numpy
  import tensorflow
  from typing import Callable
label_desc: Use image node_id 5 for calling the ParallelDQNModel obj's underlying member method code with example usage: obj.get_action(state) and returns: np, np