code: def build_synthetic_reward_network(
      self,
      state_normalization_data: NormalizationData,
      action_normalization_data: Optional[NormalizationData] = None,
      discrete_action_names: Optional[List[str]] = None,
      state_feature_config: Optional[rlt.ModelFeatureConfig] = None,
      action_feature_config: Optional[rlt.ModelFeatureConfig] = None,
  ) -> ModelBase:
      state_dim = get_num_output_features(
          state_normalization_data.dense_normalization_parameters
      )
  
      if not discrete_action_names:
          assert action_normalization_data is not None
          action_dim = get_num_output_features(
              action_normalization_data.dense_normalization_parameters
          )
      else:
          action_dim = len(discrete_action_names)
  
      net = NGramConvolutionalNetwork(
          state_dim=state_dim,
          action_dim=action_dim,
          sizes=self.sizes,
          activations=self.activations,
          last_layer_activation=self.last_layer_activation,
          context_size=self.context_size,
          conv_net_params=self.conv_net_params,
          use_layer_norm=self.use_layer_norm,
      )
      return SyntheticRewardNet(net)
  
file_path: ReAgent/reagent/net_builder/synthetic_reward/ngram_synthetic_reward.py
imports: from typing import List, Optional
  import reagent.core.types
  from reagent.core.dataclasses import dataclass, field
  from reagent.core.parameters import ConvNetParameters, NormalizationData, param_hash
  from reagent.models.base import ModelBase
  from reagent.models.synthetic_reward import NGramConvolutionalNetwork, NGramFullyConnectedNetwork, SyntheticRewardNet
  from reagent.net_builder.synthetic_reward_net_builder import SyntheticRewardNetBuilder
  from reagent.preprocessing.normalization import get_num_output_features
label_desc: Use image node_id 1 for calling the NGramConvNetSyntheticReward obj's underlying member method code with example usage: obj.build_synthetic_reward_network(state_normalization_data, action_normalization_data, discrete_action_names, state_feature_config, action_feature_config) and returns: SyntheticRewardNet