code: def test_trailing_underscore_errors_dots_and_subscripts(some_fig):
      # get error string but alter it to form the final expected string
      some_fig.add_annotation(text="hi")
  
      def _raise_bad_property_path_form():
          some_fig["layout.annotations[0].font_family_bogus"] = "hi"
  
      def _raise_bad_property_path_real():
          some_fig["layout.annotations[0].font_family_"] = "hi"
  
      correct_err_str = form_error_string(
          _raise_bad_property_path_form,
          ValueError,
          [
              (
                  "Property does not support subscripting",
                  "Property does not support subscripting and path has trailing underscores",
              ),
              ("family_bogus", "family_"),
              ("^^^^^^", "^^^^^^^"),
          ],
      )
      check_error_string(
          _raise_bad_property_path_real, ValueError, correct_err_str, []
      )
  
imports: import plotly.graph_objects
  from _plotly_utils.exceptions import PlotlyKeyError
  import pytest
label_desc: Use image node_id 18 for calling a global function with example usage: test_trailing_underscore_errors_dots_and_subscripts(some_fig) without return types