code: def create_dense_arch(
      input_dim: int,
      dense_sizes: List[int],
      dense_activations: List[str],
      use_batch_norm: bool,
      use_layer_norm: bool,
  ):
      modules: List[nn.Module] = []
      prev_layer_size = input_dim
      for size, activation in zip(dense_sizes, dense_activations):
          if use_batch_norm:
              modules.append(nn.BatchNorm1d(prev_layer_size))
          modules.append(nn.Linear(prev_layer_size, size))
          if use_layer_norm:
              modules.append(nn.LayerNorm(size))
          modules.append(ACTIVATION_MAP[activation]())
          prev_layer_size = size
      return nn.Sequential(*modules)
  
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 1 for calling a global function with example usage: create_dense_arch(input_dim, dense_sizes, dense_activations, use_batch_norm, use_layer_norm) and returns: nn