code: def test_single_step_synthetic_reward(self):
      state_dim = 10
      action_dim = 2
      sizes = [256, 128]
      activations = ["sigmoid", "relu"]
      last_layer_activation = "leaky_relu"
      reward_net = SyntheticRewardNet(
          SingleStepSyntheticRewardNet(
              state_dim=state_dim,
              action_dim=action_dim,
              sizes=sizes,
              activations=activations,
              last_layer_activation=last_layer_activation,
          )
      )
      dnn = reward_net.export_mlp().dnn
      # dnn[0] is a concat layer
      assert dnn[1].in_features == state_dim + action_dim
      assert dnn[1].out_features == 256
      assert dnn[2]._get_name() == "Sigmoid"
      assert dnn[3].in_features == 256
      assert dnn[3].out_features == 128
      assert dnn[4]._get_name() == "ReLU"
      assert dnn[5].in_features == 128
      assert dnn[5].out_features == 1
      assert dnn[6]._get_name() == "LeakyReLU"
  
      valid_step = torch.tensor([[1], [2], [3]])
      batch_size = 3
      seq_len = 4
      mask = _gen_mask(valid_step, batch_size, seq_len)
      assert torch.all(
          mask
          == torch.tensor(
              [
                  [0.0, 0.0, 0.0, 1.0],
                  [0.0, 0.0, 1.0, 1.0],
                  [0.0, 1.0, 1.0, 1.0],
              ]
          )
      )
  
file_path: ReAgent/reagent/test/models/test_synthetic_reward_net.py
imports: import logging
  import unittest
  import torch
  from reagent.core import parameters
  from reagent.models.synthetic_reward import _gen_mask, NGramConvolutionalNetwork, NGramFullyConnectedNetwork, SequenceSyntheticRewardNet, SingleStepSyntheticRewardNet, SyntheticRewardNet, TransformerSyntheticRewardNet
  from reagent.models.synthetic_reward_sparse_arch import SingleStepSyntheticSparseArchRewardNet, SyntheticRewardSparseArchNet
  from torchrec import EmbeddingBagCollection, EmbeddingBagConfig
label_desc: Use image node_id 1 for calling the TestSyntheticReward obj's underlying member method code with example usage: obj.test_single_step_synthetic_reward() without return types