code: def parametric_dqn_scorer(
      max_num_actions: int, q_network: ModelBase
  ) -> Scorer:
      @torch.no_grad()
      def score(preprocessed_obs: rlt.FeatureData) -> torch.Tensor:
          tiled_state, possible_actions = get_parametric_input(
              max_num_actions, preprocessed_obs
          )
          q_network.eval()
          scores = q_network(tiled_state, possible_actions)
          q_network.train()
          return scores.view(-1, max_num_actions)
  
      return score
  
file_path: ReAgent/reagent/gym/policies/scorers/discrete_scorer.py
imports: from typing import Optional, Tuple
  import reagent.core.types
  import torch
  from reagent.gym.preprocessors.trainer_preprocessor import get_possible_actions_for_gym
  from reagent.gym.types import Scorer
  from reagent.models.base import ModelBase
label_desc: Use image node_id 5 for calling a global function with example usage: parametric_dqn_scorer(max_num_actions, q_network) and returns: score, scores