code: def create_from_training_batch(
      cls,
      tdb: rlt.PreprocessedRankingInput,
      trainer: ReAgentLightningModule,
      reward_network: Optional[nn.Module] = None,
  ):
      if isinstance(tdb, rlt.DiscreteDqnInput):
          discrete_training_input = cast(rlt.DiscreteDqnInput, tdb)
          return EvaluationDataPage.create_from_tensors_dqn(
              trainer,
              tdb.extras.mdp_id,
              tdb.extras.sequence_number,
              discrete_training_input.state,
              discrete_training_input.action,
              tdb.extras.action_probability,
              discrete_training_input.reward,
              discrete_training_input.possible_actions_mask,
              metrics=tdb.extras.metrics,
          )
      elif isinstance(tdb, rlt.ParametricDqnInput):
          return EvaluationDataPage.create_from_tensors_parametric_dqn(
              trainer,
              tdb.extras.mdp_id,
              tdb.extras.sequence_number,
              tdb.state,
              tdb.action,
              tdb.extras.action_probability,
              tdb.reward,
              tdb.possible_actions_mask,
              tdb.possible_actions,
              tdb.extras.max_num_actions,
              metrics=tdb.extras.metrics,
          )
      else:
          raise NotImplementedError(f"training_input type: {type(tdb)}")
  
imports: from __future__ import annotations
  import logging
  import math
  from dataclasses import dataclass, fields
  from typing import cast, Optional, TYPE_CHECKING
  import numpy
  import torch
  import torch.nn
  from reagent.core import types
  from reagent.core.torch_utils import masked_softmax
  from reagent.model_utils.seq2slate_utils import Seq2SlateMode
  from reagent.models.seq2slate import Seq2SlateTransformerNet
label_desc: Use image node_id 1 for calling the EvaluationDataPage obj's underlying member method code with example usage: obj.create_from_training_batch(cls, tdb, trainer, reward_network) and returns: EvaluationDataPage, EvaluationDataPage