code: def clean_nnet_dir(
      nnet_dir,
      num_iters,
      egs_dir,
      preserve_model_interval=100,
      remove_egs=True,
      get_raw_nnet_from_am=True,
  ):
      try:
          if remove_egs:
              remove_nnet_egs(egs_dir)
  
          for iter in range(num_iters):
              remove_model(
                  nnet_dir,
                  iter,
                  num_iters,
                  None,
                  preserve_model_interval,
                  get_raw_nnet_from_am=get_raw_nnet_from_am,
              )
      except (IOError, OSError):
          logger.error("Error while cleaning up the nnet directory")
          raise
  
imports: from __future__ import division
  import argparse
  import glob
  import logging
  import os
  import math
  import re
  import shutil
  import libs.common
  from libs.nnet3.train.dropout_schedule import *
  import unittest
label_desc: Use image node_id 24 for calling a global function with example usage: clean_nnet_dir(nnet_dir, num_iters, egs_dir, preserve_model_interval, remove_egs, get_raw_nnet_from_am) without return types