code: def get_layer_set(layer: str) -> str:
      """Layers in the same layer set share a config.
  
      Args:
          layer: Full name of the layer. This will be the PyTorch or Opacus
          name of the layer in lower case (e.g. linear, rnn, dprnn), prefixed with
          gsm_ (e.g. gsm_linear, gsm_dprnn) if DP is enabled. MultiheadAttention
          is abbreviated to mha.
  
      Returns:
          The name of the layer set, where a set of layers are defined as layers
          that share the same __init__ signature.
  
      Notes:
          All RNN-based models share a config.
  
      """
      layer_set = (
          layer.replace("gsm_dp", "")
          .replace("gsm_", "")
          .replace("dp", "")
      )
  
      # all RNN-based model use the same config
      if layer_set in ["rnn", "gru", "lstm"]:
          layer_set = "rnn_base"
  
      return layer_set
  
file_path: opacus/benchmarks/utils.py
imports: import glob
  import pickle
  from collections import namedtuple
  from typing import Any, Dict, List, Optional
  import numpy
  import pandas
  import torch
  from benchmarks.layers import LayerType
label_desc: Use image node_id 2 for calling a global function with example usage: get_layer_set(layer) and returns: layer_set