code: def __init__(
      self,
      num_actions: int,
      state_preprocessor: Preprocessor,
      use_gpu: bool = False,
  ) -> None:
      super().__init__()
      self.num_actions = num_actions
      self.state_preprocessor = state_preprocessor
      self.device = (
          torch.device("cuda") if use_gpu else torch.device("cpu")
      )
  
imports: from typing import Dict
  import torch
  import torch.nn
  import torch.nn.functional
  from reagent.core import types
  from reagent.preprocessing.preprocessor import Preprocessor
label_desc: Use image node_id 1 to create a new DiscreteDqnBatchPreprocessor object from inherited base classes: BatchPreprocessor with example: obj = DiscreteDqnBatchPreprocessor(num_actions, state_preprocessor, use_gpu)