code: def check_batch_size_retry(error_str):
      """check failure error string for conditions where batch decay retry should not be attempted"""
      error_str = error_str.lower()
      if "required rank" in error_str:
          # Errors involving phrase 'required rank' typically happen when a conv is used that's
          # not compatible with channels_last memory format.
          return False
      if "illegal" in error_str:
          # 'Illegal memory access' errors in CUDA typically leave process in unusable state
          return False
      return True
  
label_desc: Use image node_id 2 for calling a global function with example usage: check_batch_size_retry(error_str) and returns: True, False, False