code: def validate_parameters(
      self,
      dense_sizes: List[int],
      dense_activations: List[str],
      overall_sizes: List[int],
      overall_activations: List[str],
      embedding_bag_collection: EmbeddingBagCollection,
  ):
      for i in range(
          1, len(embedding_bag_collection.embedding_bag_configs())
      ):
          conf_prev = embedding_bag_collection.embedding_bag_configs()[
              i - 1
          ]
          conf = embedding_bag_collection.embedding_bag_configs()[i]
          assert (
              conf_prev.embedding_dim == conf.embedding_dim
          ), "All EmbeddingBagConfigs must have the same embedding_dim"
  
      conf = embedding_bag_collection.embedding_bag_configs()[0]
      dense_output_size = dense_sizes[-1]
      assert (
          dense_output_size == conf.embedding_dim
      ), "The last layer of dense_sizes should be equal to embedding_dim of sparse features"
      assert (
          overall_sizes[-1] == 1
      ), "The last layer of overall_sizes should be 1"
  
imports: import logging
  from typing import List
  import torch
  import torch.nn
  from reagent.core import types
  from reagent.core.torch_utils import split_sequence_keyed_jagged_tensor
  from reagent.models.base import ModelBase
  from reagent.models.fully_connected_network import ACTIVATION_MAP
  from reagent.models.synthetic_reward import _gen_mask
  from torchrec import EmbeddingBagCollection
  from torchrec.models.dlrm import InteractionArch, SparseArch
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor
label_desc: Use image node_id 2 for calling the SingleStepSyntheticSparseArchRewardNet obj's underlying member method code with example usage: obj.validate_parameters(dense_sizes, dense_activations, overall_sizes, overall_activations, embedding_bag_collection) without return types