code: def __init__(self, client_module, inference=False):
      super().__init__(inference, pre_attn_norm=False)
      self.client_module = client_module
      self.cuda_graph_supported = True
  
      if HFBertLayerPolicy._orig_layer_class is None:
          try:
              import transformers
  
              HFBertLayerPolicy._orig_layer_class = [
                  transformers.models.bert.modeling_bert.BertLayer,
                  transformers.models.roberta.modeling_roberta.RobertaLayer,
              ]
          except:
              HFBertLayerPolicy._orig_layer_class = None
  
file_path: DeepSpeed/deepspeed/module_inject/containers/bert.py
imports: from .base import *
  from deepspeed.model_implementations.transformers.ds_bert import DeepSpeedBERTInference
  import torch
  from torch.nn.parameter import Parameter
  from ..policy import TransformerPolicy
label_desc: Use image node_id 1 to create a new HFBertLayerPolicy object from inherited base classes: TransformerPolicy with example: obj = HFBertLayerPolicy(client_module, inference)