code: def test_sunburst_treemap_with_path_non_rectangular():
      vendors = ["A", "B", "C", "D", None, "E", "F", "G", "H", None]
      sectors = [
          "Tech",
          "Tech",
          "Finance",
          "Finance",
          None,
          "Tech",
          "Tech",
          "Finance",
          "Finance",
          "Finance",
      ]
      regions = [
          "North",
          "North",
          "North",
          "North",
          "North",
          "South",
          "South",
          "South",
          "South",
          "South",
      ]
      values = [1, 3, 2, 4, 1, 2, 2, 1, 4, 1]
      total = ["total"] * 10
      df = pd.DataFrame(
          dict(
              vendors=vendors,
              sectors=sectors,
              regions=regions,
              values=values,
              total=total,
          )
      )
      path = ["total", "regions", "sectors", "vendors"]
      msg = "Non-leaves rows are not permitted in the dataframe"
      with pytest.raises(ValueError, match=msg):
          fig = px.sunburst(df, path=path, values="values")
      df.loc[df["vendors"].isnull(), "sectors"] = "Other"
      fig = px.sunburst(df, path=path, values="values")
      assert fig.data[0].values[-1] == np.sum(values)
  
file_path: plotly.py/packages/python/plotly/plotly/tests/test_optional/test_px/test_px_functions.py
imports: import plotly.express
  import plotly.graph_objects
  from numpy.testing import assert_array_equal
  import numpy
  import pandas
  import pytest
label_desc: Use image node_id 8 for calling a global function with example usage: test_sunburst_treemap_with_path_non_rectangular() without return types