code: def entity_save_model(model, args):
      """
      Save the model to the output directory
      """
      logger.info("Saving model to %s..." % (args.entity_output_dir))
      model_to_save = (
          model.bert_model.module
          if hasattr(model.bert_model, "module")
          else model.bert_model
      )
      model_to_save.save_pretrained(args.entity_output_dir)
      model.tokenizer.save_pretrained(args.entity_output_dir)
  
imports: import json
  import argparse
  import os
  import sys
  import random
  import logging
  import time
  from tqdm import tqdm
  import numpy
  from models.const import *
  from models.data_structures import *
  from models.entityModels import *
  from models.entityUtils import *
  from models.relationModels import *
  from models.relationUtils import *
  from transformers import AdamW, get_linear_schedule_with_warmup
  import torch
label_desc: Use image node_id 2 for calling a global function with example usage: entity_save_model(model, args) without return types