code: def _evaluate_psi_x_with_quantile_thresholds(psi_x, phi, f, taus):
      assert psi_x.ndim == 2
      batch_size, hidden_size = psi_x.shape
      assert taus.ndim == 2
      assert taus.shape[0] == batch_size
      n_taus = taus.shape[1]
      phi_taus = phi(taus)
      assert phi_taus.ndim == 3
      assert phi_taus.shape == (batch_size, n_taus, hidden_size)
      h = psi_x.unsqueeze(1) * phi_taus
      h = h.reshape(-1, hidden_size)
      assert h.shape == (batch_size * n_taus, hidden_size)
      h = f(h)
      assert h.ndim == 2
      assert h.shape[0] == batch_size * n_taus
      n_actions = h.shape[-1]
      h = h.reshape(batch_size, n_taus, n_actions)
      return QuantileDiscreteActionValue(h)
  
imports: import numpy
  import torch
  from torch import nn
  from pfrl.action_value import QuantileDiscreteActionValue
  from pfrl.agents import dqn
  from pfrl.nn import Recurrent
  from pfrl.utils.recurrent import one_step_forward, pack_and_forward
label_desc: Use image node_id 2 for calling a global function with example usage: _evaluate_psi_x_with_quantile_thresholds(psi_x, phi, f, taus) and returns: QuantileDiscreteActionValue