code: def test_endswith_nullable_string_dtype(nullable_string_dtype, na):
      values = Series(
          [
              "om",
              None,
              "foo_nom",
              "nom",
              "bar_foo",
              None,
              "foo",
              "regex",
              "rege.",
          ],
          dtype=nullable_string_dtype,
      )
      result = values.str.endswith("foo", na=na)
      exp = Series(
          [False, na, False, False, True, na, True, False, False],
          dtype="boolean",
      )
      tm.assert_series_equal(result, exp)
  
      result = values.str.endswith("rege.", na=na)
      exp = Series(
          [False, na, False, False, False, na, False, False, True],
          dtype="boolean",
      )
      tm.assert_series_equal(result, exp)
  
imports: from datetime import datetime
  import re
  import numpy
  import pytest
  from pandas.errors import PerformanceWarning
  import pandas.util._test_decorators
  import pandas
  from pandas import Series, _testing
  from pandas.tests.strings import _convert_na_value, object_pyarrow_numpy
label_desc: Use image node_id 11 for calling a global function with example usage: test_endswith_nullable_string_dtype(nullable_string_dtype, na) without return types