code: def test_breaks_from_binwidth():
      n = 10
      x = list(range(n))
      limits = min(x), max(x)
      breaks = breaks_from_binwidth(limits, binwidth=1)
      breaks2 = breaks_from_binwidth(
          limits, binwidth=1, center=limits[0]
      )
  
      # correct no. of breaks
      assert len(breaks) - 1 == n
      # breaks include the limits
      assert min(breaks) <= limits[0]
      assert max(breaks) >= limits[1]
      # limits are at mid-points of the bins in which they fall
      assert (breaks[1] + breaks[0]) / 2 == limits[0]
      assert (breaks[-1] + breaks[-2]) / 2 == limits[1]
      assert list(breaks) == list(breaks2)
  
imports: import numpy
  from plotnine.scales import scale_x_continuous, scale_x_discrete
  from plotnine.stats.binning import _adjust_breaks, breaks_from_bins, breaks_from_binwidth, fuzzybreaks
label_desc: Use image node_id 2 for calling a global function with example usage: test_breaks_from_binwidth() without return types