docs: def _get_data_bounds(data_bounds, pos=None, length=None):
      """"Prepare data bounds, possibly using min/max of the data."""
      if data_bounds is None or (isinstance(data_bounds, string_types) and
                                 data_bounds == 'auto'):
          if pos is not None and len(pos):
              m, M = pos.min(axis=0), pos.max(axis=0)
              data_bounds = [m[0], m[1], M[0], M[1]]
          else:
              data_bounds = NDC
      data_bounds = np.atleast_2d(data_bounds)
  
      ind_x = data_bounds[:, 0] == data_bounds[:, 2]
      ind_y = data_bounds[:, 1] == data_bounds[:, 3]
      if np.sum(ind_x):
          data_bounds[ind_x, 0] -= 1
          data_bounds[ind_x, 2] += 1
      if np.sum(ind_y):
          data_bounds[ind_y, 1] -= 1
          data_bounds[ind_y, 3] += 1
  
      # Extend the data_bounds if needed.
      if length is None:
          length = pos.shape[0] if pos is not None else 1
      if data_bounds.shape[0] == 1:
          data_bounds = np.tile(data_bounds, (length, 1))
  
      # Check the shape of data_bounds.
      assert data_bounds.shape == (length, 4)
  
      _check_data_bounds(data_bounds)
      return data_bounds