class_docstr: Provides methods to allow conversion between sheet and matrix
  coordinates.
docstr: Calculate the true density along x, and adjust the top and
  bottom bounds so that the density along y will be equal.
  
  Returns (adjusted_bounds, true_density)
docstr_tok: ["Calculate","the","true","density","along","x",",","and","adjust","the","top","and","bottom","bounds","so","that","the","density","along","y","will","be","equal",".","Returns","(","adjusted_bounds",",","true_density",")"]
code: def __equalize_densities(self, nominal_bounds, nominal_density):
      """
      Calculate the true density along x, and adjust the top and
      bottom bounds so that the density along y will be equal.
  
      Returns (adjusted_bounds, true_density)
      """
      left, bottom, right, top = nominal_bounds.lbrt()
      width, height = right - left, top - bottom
      center_y = bottom + height / 2.0
      # True density is not equal to the nominal_density when
      # nominal_density*(right-left) is not an integer.
      true_density = int(nominal_density * (width)) / float(width)
  
      n_cells = round(height * true_density, 0)
      adjusted_half_height = n_cells / true_density / 2.0
  
      return (
          BoundingBox(
              points=(
                  (left, center_y - adjusted_half_height),
                  (right, center_y + adjusted_half_height),
              )
          ),
          true_density,
      )
  
imports: import numpy
  from .boundingregion import BoundingBox
  from .util import datetime_types
label_desc: Use image node_id 7 for calling the SheetCoordinateSystem obj's underlying member method code with example usage: obj.__equalize_densities(nominal_bounds, nominal_density) and returns: BoundingBox,  true_density