code: def process_args(
      input_ckpt: Union[FluidPath, str],
      config: Union[FluidPath, str],
      output_path: Union[FluidPath, str],
      dtype: str = "fp16",
      cpu: bool = False,
      **kwargs,
  ):
      # validate paths and turn them into Pathy paths.
      input_ckpt = Pathy.fluid(str(input_ckpt))
      assert input_ckpt.is_dir(), f'no such directory "{input_ckpt}"'
      config = Pathy.fluid(str(config))
      assert config.is_file(), f'no such file "{config}"'
      first_shard = input_ckpt / "shard_0"
      assert first_shard.is_dir(), f'no shards found at "{input_ckpt}"'
  
      output_path = Pathy.fluid(str(output_path))
      output_path.mkdir(exist_ok=True)
  
      # make sure dtype is valid
      assert dtype in {"fp16", "fp32", "bf16"}
      np_dtype = np.float16
      torch_dtype = torch.float16
      if dtype != "fp16":
          warnings.warn(
              "WARNING: Dtype support other than fp16 is Experimental. Make sure to check weights after conversion to make sure dtype information is retained."
          )
          if dtype == "bf16":
              # np doesn't have bfloat16 so float32 is used to retain information before converting to torch.
              np_dtype = np.float32
              torch_dtype = torch.bfloat16
          elif dtype == "fp32":
              np_dtype = np.float32
              torch_dtype = torch.float32
  
      # tell jax to run on cpu instead of gpu/tpu
      if cpu:
          jax.config.update("jax_platform_name", "cpu")
  
      return input_ckpt, config, output_path, np_dtype, torch_dtype
  
imports: import argparse
  import io
  import multiprocessing
  import time
  import warnings
  import os
  import re
  from typing import Iterable, List, Union
  import json
  import jax
  import jax.numpy
  from jax.experimental import maps
  from pathy import FluidPath, Pathy
  import numpy
  import optax
  import torch
  from tqdm import tqdm
  from mesh_transformer.transformer_shard import CausalTransformer
label_desc: Use image node_id 1 for calling a global function with example usage: process_args(input_ckpt, config, output_path, dtype, cpu) and returns: input_ckpt,  config,  output_path,  np_dtype,  torch_dtype