code: def test_import_error_message():
      # GH-19810
      df = DataFrame({"A": [1, 2]})
  
      with pytest.raises(
          ImportError, match="matplotlib is required for plotting"
      ):
          df.plot()
  
imports: import os
  import numpy
  import pytest
  import pandas.util._test_decorators
  from pandas import DataFrame, Index, Series, Timestamp, date_range, interval_range, period_range, plotting, read_csv
  import pandas._testing
  from pandas.tests.plotting.common import _check_colors, _check_legend_labels, _check_plot_works, _check_text_labels, _check_ticks_props
label_desc: Use image node_id 2 for calling a global function with example usage: test_import_error_message() without return types