code: def parametric_dqn_serving_scorer(
      max_num_actions: int, q_network: torch.nn.Module
  ) -> Scorer:
      @torch.no_grad()
      def score(
          value_presence: Tuple[torch.Tensor, torch.Tensor]
      ) -> torch.Tensor:
          obs = value_presence[0]
          tiled_state, possible_actions = get_parametric_input(
              max_num_actions, rlt.FeatureData(obs)
          )
          tiled_state_tensor = tiled_state.float_features
          possible_actions_tensor = possible_actions.float_features
          action_names, q_values = q_network(
              state_with_presence=(
                  tiled_state_tensor,
                  torch.ones_like(tiled_state_tensor),
              ),
              action_with_presence=(
                  possible_actions_tensor,
                  torch.ones_like(possible_actions_tensor),
              ),
          )
          return q_values.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 6 for calling a global function with example usage: parametric_dqn_serving_scorer(max_num_actions, q_network) and returns: score, q_values