code: def test_df_hist(stacked, histtype, maxbins):
      df = pd.DataFrame({"x": range(10), "y": range(10)})
  
      marks = {
          "bar": "bar",
          "step": {"type": "line", "interpolate": "step"},
          "stepfilled": {"type": "area", "interpolate": "step"},
      }
  
      # bar histogram
      plot = df.vgplot.hist(
          bins=maxbins, stacked=stacked, histtype=histtype
      )
      assert plot.mark == marks[histtype]
      if stacked:
          # No default opacity for a stacked histogram
          utils.check_encodings(
              plot, x="value", y=utils.IGNORE, color="variable"
          )
      else:
          utils.check_encodings(
              plot,
              x="value",
              y=utils.IGNORE,
              color="variable",
              opacity=utils.IGNORE,
          )
      assert plot["encoding"]["x"]["bin"] == {"maxbins": maxbins}
      assert plot["encoding"]["y"]["aggregate"] == "count"
      assert plot["encoding"]["y"]["stack"] == (
          "zero" if stacked else None
      )
  
imports: import pytest
  import pandas
  import altair
  from pdvega.tests import utils
label_desc: Use image node_id 22 for calling a global function with example usage: test_df_hist(stacked, histtype, maxbins) without return types