code: def get_xritdecompress_cmd():
      
      cmd = os.environ.get('XRIT_DECOMPRESS_PATH', None)
      if not cmd:
          raise IOError("XRIT_DECOMPRESS_PATH is not defined (complete path to xRITDecompress)")
  
      question = ("Did you set the environment variable XRIT_DECOMPRESS_PATH correctly?")
      if not os.path.exists(cmd):
          raise IOError(str(cmd) + " does not exist!\n" + question)
      elif os.path.isdir(cmd):
          raise IOError(str(cmd) + " is a directory!\n" + question)
  
      return cmd
docs: Find a valid binary for the xRITDecompress command.