code: def _construct_nn_model(
      input_size: int, hidden_size: int, n_layers: int, modeltype: int
  ):
      """
      Constructs Neural Network
  
      Parameters
      ----------
      input_size: int
          size of neural network input
      hidden_size: int
          size of the hidden layers ; there are 3 hidden layers in this method
      n_layers: int
          number of layers in the neural network
      modeltype: int
          model type 2 includes an activation layer whereas type 1 does not.
  
      Returns
      -------
      torch.nn.Sequential(*layers)
  
      Notes
      -----
      It is not necessary to use this method with the XCModel, user defined pytorch
      models will work.
      """
      if modeltype == 1:
          layers: List[Any]
          layers = []
          for i in range(n_layers):
              n1 = input_size if i == 0 else hidden_size
              layers.append(torch.nn.Linear(n1, hidden_size))
              layers.append(torch.nn.Softplus())
          layers.append(torch.nn.Linear(hidden_size, 1, bias=False))
          return torch.nn.Sequential(*layers)
      elif modeltype == 2:
          layers = []
          for i in range(n_layers):
              n1 = input_size if i == 0 else hidden_size
              layers.append(torch.nn.Linear(n1, hidden_size))
              if i < n_layers - 1:
                  layers.append(torch.nn.Softplus())
              else:
                  layers.append(ExpM1Activation())
          layers.append(torch.nn.Linear(hidden_size, 1, bias=False))
          return torch.nn.Sequential(*layers)
  
file_path: deepchem/deepchem/models/dft/dftxc.py
imports: from deepchem.models.dft.scf import XCNNSCF
  import torch
  from deepchem.models.dft.nnxc import HybridXC
  from deepchem.models.losses import Loss, L2Loss
  from deepchem.models.torch_models.torch_model import TorchModel
  from typing import Tuple, Optional, List, Any
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: _construct_nn_model(input_size, hidden_size, n_layers, modeltype) and returns: torch, torch