code: def _parse_size(size, bounds):
      width, height = size
  
      if width is None and height is None:
          raise ValueError("Both width and height cannot be undefined")
  
      min_bounds, max_bounds = bounds
  
      w = max_bounds[0] - min_bounds[0]
      h = max_bounds[1] - min_bounds[1]
  
      if height is None or height < 0:
          height = int(round(h * (width * 1.0 / w)))
  
      if width is None or width < 0:
          width = int(round(w * (height * 1.0 / h)))
  
      return width, height
  
imports: import itertools
  import logging
  import warnings
  import numpy
  import scipy.spatial
  import eta.core.numutils
  import fiftyone.core.fields
  import fiftyone.core.labels
  import fiftyone.core.media
  from fiftyone.core.sample import Sample
  import fiftyone.core.utils
  import fiftyone.core.validation
  from fiftyone.core.odm import DynamicEmbeddedDocument
  import fiftyone.utils.image
label_desc: Use image node_id 14 for calling a global function with example usage: _parse_size(size, bounds) and returns: width,  height