code: def get_args(
      default: Optional[List[str]] = None, env: Optional[Env] = None
  ) -> Optional[List[str]]:
      if env is None:
          env = os.environ
      if env.get(ARGS):
          try:
              return json.loads(env.get(ARGS, "[]"))  # type: ignore
          except ValueError:
              return None
      else:
          return default or sys.argv[1:]
  
imports: import json
  import os
  import sys
  from distutils.util import strtobool
  from pathlib import Path
  from typing import List, MutableMapping, Optional, Union
  import appdirs
label_desc: Use image node_id 8 for calling a global function with example usage: get_args(default, env) and returns: unknown, json, None