code: def is_valid_box_values(boxes: NdarrayOrTensor) -> bool:
      """
      This function checks whether the box size is non-negative.
  
      Args:
          boxes: bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode is assumed to be ``StandardMode``
  
      Returns:
          whether ``boxes`` is valid
      """
      spatial_dims = get_spatial_dims(boxes=boxes)
      for axis in range(0, spatial_dims):
          if (boxes[:, spatial_dims + axis] < boxes[:, axis]).sum() > 0:
              return False
      return True
  
imports: from __future__ import annotations
  import inspect
  import warnings
  from abc import ABC, abstractmethod
  from collections.abc import Callable, Sequence
  from copy import deepcopy
  import numpy
  import torch
  from monai.config.type_definitions import NdarrayOrTensor, NdarrayTensor
  from monai.utils import look_up_option
  from monai.utils.enums import BoxModeName
  from monai.utils.type_conversion import convert_data_type, convert_to_dst_type
label_desc: Use image node_id 9 for calling a global function with example usage: is_valid_box_values(boxes) and returns: True, False