code: def _load_reward_net(name_and_path, use_gpu):
      reward_name_and_net = {}
      for name, path in name_and_path.items():
          reward_network = torch.jit.load(path)
          if use_gpu:
              reward_network = reward_network.cuda()
          reward_name_and_net[name] = reward_network
      return reward_name_and_net
  
imports: import logging
  from itertools import permutations
  from typing import List, Optional
  import numpy
  import reagent.core.types
  import torch
  import torch.nn
  from reagent.core.dataclasses import field
  from reagent.core.parameters import Seq2SlateParameters
  from reagent.core.torch_utils import gather
  from reagent.models.seq2slate import BaselineNet, Seq2SlateMode, Seq2SlateTransformerNet
  from reagent.optimizer.union import Optimizer__Union
  from reagent.training.ranking.seq2slate_trainer import Seq2SlateTrainer
label_desc: Use image node_id 1 for calling a global function with example usage: _load_reward_net(name_and_path, use_gpu) and returns: reward_name_and_net