code: def rename(save_dir):
      """Rename converted files with hash"""
      old_names = os.listdir(save_dir)
      for old_name in old_names:
          old_path = os.path.join(save_dir, old_name)
          long_hash = sha1sum(old_path)
          file_prefix, file_sufix = old_name.split(".")
          new_name = "{file_prefix}-{short_hash}.{file_sufix}".format(
              file_prefix=file_prefix,
              short_hash=long_hash[:8],
              file_sufix=file_sufix,
          )
          new_path = os.path.join(save_dir, new_name)
          shutil.move(old_path, new_path)
          file_size = os.path.getsize(new_path)
          logging.info(
              "\t{} {} {}".format(new_path, long_hash, file_size)
          )
  
imports: import os
  import re
  import json
  import shutil
  import logging
  import argparse
  import tensorflow
  from tensorflow.contrib.training import HParams
  from gpt_2.src import model
  import mxnet
  import numpy
  from numpy.testing import assert_allclose
  from gluonnlp.data.vocab import Vocab
  from gluonnlp.utils.misc import sha1sum, logging_config, naming_convention
  from gluonnlp.models.gpt2 import GPT2Model, GPT2ForLM
label_desc: Use image node_id 6 for calling a global function with example usage: rename(save_dir) without return types