code: def test_fail_wrong_column():
      # Testing for each of bare string, list, and basic dictionary
      for hover_data_value in ["d", ["d"], {"d": True}]:
          with pytest.raises(ValueError) as err_msg:
              px.scatter(
                  {"a": [1, 2], "b": [3, 4], "c": [2, 1]},
                  x="a",
                  y="b",
                  hover_data=hover_data_value,
              )
          assert (
              "Value of 'hover_data_0' is not the name of a column in 'data_frame'."
              in str(err_msg.value)
          )
      # Testing other dictionary possibilities below
      with pytest.raises(ValueError) as err_msg:
          px.scatter(
              {"a": [1, 2], "b": [3, 4], "c": [2, 1]},
              x="a",
              y="b",
              hover_data={"d": ":.1f"},
          )
      assert (
          "Value of 'hover_data_0' is not the name of a column in 'data_frame'."
          in str(err_msg.value)
      )
      with pytest.raises(ValueError) as err_msg:
          px.scatter(
              {"a": [1, 2], "b": [3, 4], "c": [2, 1]},
              x="a",
              y="b",
              hover_data={"d": [3, 4, 5]},  # d is too long
          )
      assert (
          "All arguments should have the same length. The length of hover_data key `d` is 3"
          in str(err_msg.value)
      )
      with pytest.raises(ValueError) as err_msg:
          px.scatter(
              {"a": [1, 2], "b": [3, 4], "c": [2, 1]},
              x="a",
              y="b",
              hover_data={"d": (True, [3, 4, 5])},  # d is too long
          )
      assert (
          "All arguments should have the same length. The length of hover_data key `d` is 3"
          in str(err_msg.value)
      )
      with pytest.raises(ValueError) as err_msg:
          px.scatter(
              {"a": [1, 2], "b": [3, 4], "c": [2, 1]},
              x="a",
              y="b",
              hover_data={"c": [3, 4]},
          )
      assert (
          "Ambiguous input: values for 'c' appear both in hover_data and data_frame"
          in str(err_msg.value)
      )
      with pytest.raises(ValueError) as err_msg:
          px.scatter(
              {"a": [1, 2], "b": [3, 4], "c": [2, 1]},
              x="a",
              y="b",
              hover_data={"c": (True, [3, 4])},
          )
      assert (
          "Ambiguous input: values for 'c' appear both in hover_data and data_frame"
          in str(err_msg.value)
      )
  
file_path: plotly.py/packages/python/plotly/plotly/tests/test_optional/test_px/test_px_hover.py
imports: import plotly.express
  import numpy
  import pandas
  import pytest
  from collections import OrderedDict
label_desc: Use image node_id 6 for calling a global function with example usage: test_fail_wrong_column() without return types