code: def _parse_checkpoint_storage_args(args: Namespace) -> Any:
      if (args.checkpoint_storage_config is not None) and (
          args.checkpoint_storage_config_file is not None
      ):
          raise api.errors.BadRequestException(
              "can only provide --checkpoint_storage_config or --checkpoint_storage_config_file"
          )
      checkpoint_storage = args.checkpoint_storage_config_file
      if args.checkpoint_storage_config is not None:
          checkpoint_storage = json.loads(
              args.checkpoint_storage_config
          )
      return checkpoint_storage
  
imports: import json
  from argparse import ArgumentError, Namespace
  from time import sleep
  from typing import Any, Dict, List, Optional, Sequence
  import determined.cli.render
  from determined import cli
  from determined.cli import render
  from determined.cli.user import AGENT_USER_GROUP_ARGS
  from determined.common import api, util
  from determined.common.api import authentication, bindings, errors
  from determined.common.declarative_argparse import Arg, Cmd
  from determined.common.experimental import workspace
label_desc: Use image node_id 8 for calling a global function with example usage: _parse_checkpoint_storage_args(args) and returns: checkpoint_storage