code: def discrete_dqn_serving_scorer(q_network: torch.nn.Module) -> Scorer:
      @torch.no_grad()
      def score(
          state: rlt.ServingFeatureData,
          possible_actions_mask: Optional[torch.Tensor] = None,
      ) -> torch.Tensor:
          action_names, q_values = q_network(*state)
          q_values = apply_possible_actions_mask(
              q_values, possible_actions_mask
          )
          return q_values
  
      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 3 for calling a global function with example usage: discrete_dqn_serving_scorer(q_network) and returns: score, q_values