code: def test_startswith(pat, dtype, null_value, na):
      # add category dtype parametrizations for GH-36241
      values = Series(
          [
              "om",
              null_value,
              "foo_nom",
              "nom",
              "bar_foo",
              null_value,
              "foo",
          ],
          dtype=dtype,
      )
  
      result = values.str.startswith(pat)
      exp = Series([False, np.nan, True, False, False, np.nan, True])
      if dtype == "object" and null_value is pd.NA:
          # GH#18463
          exp = exp.fillna(null_value)
      elif dtype == "object" and null_value is None:
          exp[exp.isna()] = None
      tm.assert_series_equal(result, exp)
  
      result = values.str.startswith(pat, na=na)
      exp = Series([False, na, True, False, False, na, True])
      tm.assert_series_equal(result, exp)
  
      # mixed
      mixed = np.array(
          [
              "a",
              np.nan,
              "b",
              True,
              datetime.today(),
              "foo",
              None,
              1,
              2.0,
          ],
          dtype=np.object_,
      )
      rs = Series(mixed).str.startswith("f")
      xp = Series(
          [
              False,
              np.nan,
              False,
              np.nan,
              np.nan,
              True,
              None,
              np.nan,
              np.nan,
          ]
      )
      tm.assert_series_equal(rs, xp)
  
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 8 for calling a global function with example usage: test_startswith(pat, dtype, null_value, na) without return types