code: def bert_model_provider(
      pre_process=True, post_process=True, cpu_offload=False
  ):
      args = get_args()
      num_tokentypes = 2 if args.bert_binary_head else 0
      model = BertModel(
          num_tokentypes=num_tokentypes,
          add_binary_head=args.bert_binary_head,
          parallel_output=True,
          pre_process=pre_process,
          post_process=post_process,
          cpu_offload=cpu_offload,
      )
      return model
  
imports: import contextlib
  import torch
  from apex.transformer import tensor_parallel
  from apex.transformer.enums import AttnMaskType
  from apex.transformer.enums import ModelType
  from apex.transformer.layers import FusedLayerNorm
  from apex.transformer.testing.global_vars import get_args
  from apex.transformer.testing.standalone_transformer_lm import MegatronModule, get_language_model, get_linear_layer, init_method_normal, scaled_init_method_normal, parallel_lm_logits
label_desc: Use image node_id 4 for calling a global function with example usage: bert_model_provider(pre_process, post_process, cpu_offload) and returns: model