code: def prepare_save_path(args):
      """Create save path and makedirs if not exists."""
      task_name = "{}_{}_d_{}_g_{}_e_{}_r_{}_l_{}_lr_{}_{}_{}".format(
          args.model_name,
          args.data_name,
          args.embed_dim,
          args.gamma,
          "cpu" if args.ent_emb_on_cpu else "gpu",
          "cpu" if args.rel_emb_on_cpu else "gpu",
          args.loss_type,
          args.lr,
          args.cpu_lr,
          args.task_name,
      )
  
      args.save_path = os.path.join(args.save_path, task_name)
  
      if dist.get_rank() == 0:
          if not os.path.exists(args.save_path):
              os.makedirs(args.save_path)
      return args
  
file_path: PGL/apps/Graph4KG/config.py
imports: import os
  import sys
  import math
  import json
  import warnings
  from argparse import ArgumentParser
  import paddle.distributed
label_desc: Use image node_id 2 for calling a global function with example usage: prepare_save_path(args) and returns: args