code: def breaks_from_binwidth(
      x_range: TupleFloat2,
      binwidth: float,
      center: Optional[float] = None,
      boundary: Optional[float] = None,
  ):
      """
      Calculate breaks given binwidth
  
      Parameters
      ----------
      x_range :
          Range over with to calculate the breaks. Must be
          of size 2.
      binwidth :
          Separation between the breaks
      center :
          The center of one of the bins
      boundary :
          A boundary between two bins
  
      Returns
      -------
      out : array_like
          Sequence of break points.
      """
      if binwidth <= 0:
          raise PlotnineError("The 'binwidth' must be positive.")
  
      if boundary is not None and center is not None:
          raise PlotnineError(
              "Only one of 'boundary' and 'center' " "may be specified."
          )
      elif boundary is None:
          # When center is None, put the min and max of data in outer
          # half of their bins
          boundary = binwidth / 2
          if center is not None:
              boundary = center - boundary
  
      epsilon = np.finfo(float).eps
      shift = np.floor((x_range[0] - boundary) / binwidth)
      origin = boundary + shift * binwidth
      # The (1-epsilon) factor prevents numerical roundoff in the
      # binwidth from creating an extra break beyond the one that
      # includes x_range[1].
      max_x = x_range[1] + binwidth * (1 - epsilon)
      breaks = np.arange(origin, max_x, binwidth)
      return breaks
  
file_path: plotnine/plotnine/stats/binning.py
imports: from __future__ import annotations
  import typing
  import numpy
  import pandas
  from ..exceptions import PlotnineError
  from ..scales.scale_discrete import scale_discrete
label_desc: Use image node_id 2 for calling a global function with example usage: breaks_from_binwidth(x_range, binwidth, center, boundary) and returns: breaks