code: def sanity_checks(args):
      """
      A bunch of args sanity checks to perform even starting...
      """
      assert (args.mlm and args.alpha_mlm > 0.0) or (
          not args.mlm and args.alpha_mlm == 0.0
      )
      assert (args.alpha_mlm > 0.0 and args.alpha_clm == 0.0) or (
          args.alpha_mlm == 0.0 and args.alpha_clm > 0.0
      )
      if args.mlm:
          assert os.path.isfile(args.token_counts)
          assert (args.student_type in ["roberta", "distilbert"]) and (
              args.teacher_type in ["roberta", "bert"]
          )
      else:
          assert (args.student_type in ["gpt2"]) and (
              args.teacher_type in ["gpt2"]
          )
  
      assert args.teacher_type == args.student_type or (
          args.student_type == "distilbert"
          and args.teacher_type == "bert"
      )
      assert os.path.isfile(args.student_config)
      if args.student_pretrained_weights is not None:
          assert os.path.isfile(args.student_pretrained_weights)
  
      if args.freeze_token_type_embds:
          assert args.student_type in ["roberta"]
  
      assert args.alpha_ce >= 0.0
      assert args.alpha_mlm >= 0.0
      assert args.alpha_clm >= 0.0
      assert args.alpha_mse >= 0.0
      assert args.alpha_cos >= 0.0
      assert (
          args.alpha_ce
          + args.alpha_mlm
          + args.alpha_clm
          + args.alpha_mse
          + args.alpha_cos
          > 0.0
      )
  
file_path: transformers/examples/research_projects/distillation/train.py
imports: import argparse
  import json
  import os
  import pickle
  import shutil
  import numpy
  import torch
  from distiller import Distiller
  from lm_seqs_dataset import LmSeqsDataset
  from transformers import BertConfig, BertForMaskedLM, BertTokenizer, DistilBertConfig, DistilBertForMaskedLM, DistilBertTokenizer, GPT2Config, GPT2LMHeadModel, GPT2Tokenizer, RobertaConfig, RobertaForMaskedLM, RobertaTokenizer
  from utils import git_log, init_gpu_params, logger, set_seed
label_desc: Use image node_id 1 for calling a global function with example usage: sanity_checks(args) without return types