code: def test_sunburst_treemap_with_path_and_hover():
      df = px.data.tips()
      fig = px.sunburst(
          df,
          path=["sex", "day", "time", "smoker"],
          color="smoker",
          hover_data=["smoker"],
      )
      assert "smoker" in fig.data[0].hovertemplate
  
      df = px.data.gapminder().query("year == 2007")
      fig = px.sunburst(
          df,
          path=["continent", "country"],
          color="lifeExp",
          hover_data=df.columns,
      )
      assert fig.layout.coloraxis.colorbar.title.text == "lifeExp"
  
      df = px.data.tips()
      fig = px.sunburst(
          df, path=["sex", "day", "time", "smoker"], hover_name="smoker"
      )
      assert (
          "smoker" not in fig.data[0].hovertemplate
      )  # represented as '%{hovertext}'
      assert (
          "%{hovertext}" in fig.data[0].hovertemplate
      )  # represented as '%{hovertext}'
  
      df = px.data.tips()
      fig = px.sunburst(
          df,
          path=["sex", "day", "time", "smoker"],
          custom_data=["smoker"],
      )
      assert fig.data[0].customdata[0][0] in ["Yes", "No"]
      assert "smoker" not in fig.data[0].hovertemplate
      assert "%{hovertext}" not in fig.data[0].hovertemplate
  
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 5 for calling a global function with example usage: test_sunburst_treemap_with_path_and_hover() without return types