code: def tar_and_copy_usr_dir(usr_dir, train_dir):
      """Package, tar, and copy usr_dir to GCS train_dir."""
      tf.logging.info("Tarring and pushing t2t_usr_dir.")
      usr_dir = os.path.abspath(os.path.expanduser(usr_dir))
      # Copy usr dir to a temp location
      top_dir = os.path.join(tempfile.gettempdir(), "t2t_usr_container")
      tmp_usr_dir = os.path.join(
          top_dir, usr_dir_lib.INTERNAL_USR_DIR_PACKAGE
      )
      shutil.rmtree(top_dir, ignore_errors=True)
      shutil.copytree(usr_dir, tmp_usr_dir)
      # Insert setup.py if one does not exist
      top_setup_fname = os.path.join(top_dir, "setup.py")
      setup_file_str = get_setup_file(
          name="DummyUsrDirPackage", packages=get_requirements(usr_dir)
      )
      with tf.gfile.Open(top_setup_fname, "w") as f:
          f.write(setup_file_str)
      usr_tar = _tar_and_copy(top_dir, train_dir)
      return usr_tar
  
imports: import datetime
  import os
  import pprint
  import shutil
  import subprocess
  import sys
  import tempfile
  from googleapiclient import discovery
  from oauth2client.client import GoogleCredentials
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import usr_dir
  import tensorflow.compat.v1
label_desc: Use image node_id 15 for calling a global function with example usage: tar_and_copy_usr_dir(usr_dir, train_dir) and returns: usr_tar