code: def put_ckpt_hdfs(remote_dir, ckpt_name):
      """
      Upload checkpoint file with name of ckpt_name to the hdfs directory
      {remote_dir}/{ray_checkpoint_dir}[-IDENTIFIER_LEN:].
  
      Note that ray_checkpoint_dir is like train_func_0_{config}_{time}_{tmp},
      with a max identifier length of 130. However, if there is a list("[]") in config and is
      truncated with half "[" remained, then the path name can't be identified by hadoop command.
      Therefore we use the last IDENTIFIER_LEN=27 of ray_checkpoint_dir as remote_ckpt_basename,
      with a format of {time}_{tmp}, in order to avoid misinterpretation.
      """
  
      local_ckpt_dir = os.path.abspath(".")
      remote_ckpt_basename = os.path.basename(local_ckpt_dir)[
          -IDENTIFIER_LEN:
      ]
      remote_ckpt_dir = os.path.join(remote_dir, remote_ckpt_basename)
      if remote_ckpt_basename not in get_remote_list(remote_dir):
          cmd = (
              f"hadoop fs -mkdir {remote_ckpt_dir};"
              f" hadoop fs -put -f {ckpt_name} {remote_ckpt_dir}"
          )
      else:
          cmd = f"hadoop fs -put -f {ckpt_name} {remote_ckpt_dir}"
      process(cmd)
  
imports: import os
label_desc: Use image node_id 3 for calling a global function with example usage: put_ckpt_hdfs(remote_dir, ckpt_name) without return types