code: def test_auto_histfunc():
      a = [1, 2]
      assert px.histogram(x=a).data[0].histfunc is None
      assert px.histogram(y=a).data[0].histfunc is None
      assert px.histogram(x=a, y=a).data[0].histfunc == "sum"
      assert (
          px.histogram(x=a, y=a, histfunc="avg").data[0].histfunc
          == "avg"
      )
  
      assert px.density_heatmap(x=a, y=a).data[0].histfunc is None
      assert px.density_heatmap(x=a, y=a, z=a).data[0].histfunc == "sum"
      assert (
          px.density_heatmap(x=a, y=a, z=a, histfunc="avg")
          .data[0]
          .histfunc
          == "avg"
      )
  
imports: import plotly.express
  import plotly.graph_objects
  import numpy
  import pandas
  import pytest
  from packaging import version
  import unittest.mock
  from plotly.express._core import build_dataframe
  from pandas.testing import assert_frame_equal
label_desc: Use image node_id 34 for calling a global function with example usage: test_auto_histfunc() without return types