code: def test_parsing_tzlocal_deprecated():
      # GH#50791
      msg = (
          "Parsing 'EST' as tzlocal.*"
          "Pass the 'tz' keyword or call tz_localize after construction instead"
      )
      dtstr = "Jan 15 2004 03:00 EST"
  
      with tm.set_timezone("US/Eastern"):
          with tm.assert_produces_warning(FutureWarning, match=msg):
              res, _ = parse_datetime_string_with_reso(dtstr)
  
          assert isinstance(res.tzinfo, tzlocal)
  
          with tm.assert_produces_warning(FutureWarning, match=msg):
              res = parsing.py_parse_datetime_string(dtstr)
          assert isinstance(res.tzinfo, tzlocal)
  
imports: from datetime import datetime
  import re
  from dateutil.parser import parse
  from dateutil.tz import tzlocal
  from hypothesis import given
  import numpy
  import pytest
  from pandas._libs.tslibs import parsing, strptime
  from pandas._libs.tslibs.parsing import parse_datetime_string_with_reso
  from pandas.compat import ISMUSL, is_platform_windows
  import pandas.util._test_decorators
  import pandas._testing
  from pandas._testing._hypothesis import DATETIME_NO_TZ
label_desc: Use image node_id 1 for calling a global function with example usage: test_parsing_tzlocal_deprecated() without return types