code: def get_layers(hid_layers, dropout=0.0):
      layerlist = [
          torch.nn.Linear(Xtrain_tensor.shape[1], hid_layers[0])
      ]
      if len(hid_layers) != 1:
          for i in range(len(hid_layers) - 1):
              if dropout > 0:
                  layerlist.append(torch.nn.Dropout(p=dropout))
              layerlist.extend(
                  [
                      torch.nn.ReLU(),
                      torch.nn.Linear(hid_layers[i], hid_layers[i + 1]),
                  ]
              )
      if dropout > 0:
          layerlist.append(torch.nn.Dropout(p=dropout))
      layerlist += [torch.nn.ReLU(), torch.nn.Linear(hid_layers[-1], 1)]
      return torch.nn.Sequential(*layerlist)
  
imports: import os, re, copy, pickle, sys
  from collections import defaultdict
  from tqdm import tqdm
  from functools import partial
  import numpy
  import pandas
  from scipy import linalg, special
  from sklearn import impute, preprocessing, model_selection, metrics, linear_model, datasets, pipeline
  import xgboost
  import torch
  import shap
  from attributionpriors.pytorch_ops import ExpectedGradientsModel
  from matplotlib import pyplot
label_desc: Use image node_id 6 for calling a global function with example usage: get_layers(hid_layers, dropout) and returns: torch