code: def get_custom_path(command, env_dir="NIFTYREGDIR"):
      return os.path.join(os.getenv(env_dir, ""), command)
  
imports: import os
  from packaging.version import Version
  from ...None import logging
  from ..base import CommandLine, CommandLineInputSpec, traits, Undefined, PackageInfo
  from ...utils.filemanip import split_filename
label_desc: Use image node_id 1 for calling a global function with example usage: get_custom_path(command, env_dir) and returns: os