code: def test_histogram():
      num_rows = 101
      num_groups = 5
      ht = hl.utils.range_table(num_rows)
      ht = ht.annotate(mod_3=hl.str(ht.idx % num_groups))
      for position in ["stack", "dodge", "identity"]:
          fig = ggplot(ht, aes(x=ht.idx)) + geom_histogram(
              aes(fill=ht.mod_3), alpha=0.5, position=position, bins=10
          )
          pfig = fig.to_plotly()
          assert len(pfig.data) == num_groups
          for idx, bar in enumerate(pfig.data):
              if position in {"stack", "identity"}:
                  assert (
                      bar.x
                      == [
                          float(e)
                          for e in range(
                              num_groups, num_rows - 1, num_groups * 2
                          )
                      ]
                  ).all()
              else:
                  dist_between_bars_in_one_group = (num_rows - 1) / (
                      num_groups * 2
                  )
                  single_bar_width = (
                      dist_between_bars_in_one_group / num_groups
                  )
                  first_bar_start = (
                      single_bar_width / 2 + idx * single_bar_width
                  )
                  assert (
                      bar.x
                      == np.arange(
                          first_bar_start,
                          num_rows - 1,
                          dist_between_bars_in_one_group,
                      )
                  ).all()
  
file_path: hail/hail/python/test/hail/ggplot/test_ggplot.py
imports: import hail
  from hail.ggplot import *
  import numpy
  import math
label_desc: Use image node_id 3 for calling a global function with example usage: test_histogram() without return types