code: def convert_opt_checkpoint(
      checkpoint_path, pytorch_dump_folder_path, config=None
  ):
      """
      Copy/paste/tweak model's weights to our BERT structure.
      """
      state_dict = load_checkpoint(checkpoint_path)
  
      if config is not None:
          config = OPTConfig.from_pretrained(config)
      else:
          config = OPTConfig()
  
      model = OPTModel(config).half().eval()
      model.load_state_dict(state_dict)
  
      # Check results
      Path(pytorch_dump_folder_path).mkdir(exist_ok=True)
      model.save_pretrained(pytorch_dump_folder_path)
  
imports: import argparse
  from pathlib import Path
  import torch
  from transformers import OPTConfig, OPTModel
  from transformers.utils import logging
label_desc: Use image node_id 2 for calling a global function with example usage: convert_opt_checkpoint(checkpoint_path, pytorch_dump_folder_path, config) without return types