code: def test_datetime_eval() -> None:
      result = datetime_eval("datetime('now')")
      expected = datetime(2016, 11, 7, 9, 30, 10)
      assert result == expected
  
      result = datetime_eval("datetime('today')")
      expected = datetime(2016, 11, 7)
      assert result == expected
  
      result = datetime_eval("datetime('2018')")
      expected = datetime(2018, 1, 1)
      assert result == expected
  
      result = datetime_eval("datetime('2018-9')")
      expected = datetime(2018, 9, 1)
      assert result == expected
  
      # Parse compact arguments spelling
      result = datetime_eval("dateadd(datetime('today'),1,year,)")
      expected = datetime(2017, 11, 7)
      assert result == expected
  
      result = datetime_eval("dateadd(datetime('today'), -2, year)")
      expected = datetime(2014, 11, 7)
      assert result == expected
  
      result = datetime_eval("dateadd(datetime('today'), 2, quarter)")
      expected = datetime(2017, 5, 7)
      assert result == expected
  
      result = datetime_eval("dateadd(datetime('today'), 3, month)")
      expected = datetime(2017, 2, 7)
      assert result == expected
  
      result = datetime_eval("dateadd(datetime('today'), -3, week)")
      expected = datetime(2016, 10, 17)
      assert result == expected
  
      result = datetime_eval("dateadd(datetime('today'), 3, day)")
      expected = datetime(2016, 11, 10)
      assert result == expected
  
      result = datetime_eval("dateadd(datetime('now'), 3, hour)")
      expected = datetime(2016, 11, 7, 12, 30, 10)
      assert result == expected
  
      result = datetime_eval("dateadd(datetime('now'), 40, minute)")
      expected = datetime(2016, 11, 7, 10, 10, 10)
      assert result == expected
  
      result = datetime_eval("dateadd(datetime('now'), -11, second)")
      expected = datetime(2016, 11, 7, 9, 29, 59)
      assert result == expected
  
      result = datetime_eval("datetrunc(datetime('now'), year)")
      expected = datetime(2016, 1, 1, 0, 0, 0)
      assert result == expected
  
      result = datetime_eval("datetrunc(datetime('now'), quarter)")
      expected = datetime(2016, 10, 1, 0, 0, 0)
      assert result == expected
  
      result = datetime_eval("datetrunc(datetime('now'), month)")
      expected = datetime(2016, 11, 1, 0, 0, 0)
      assert result == expected
  
      result = datetime_eval("datetrunc(datetime('now'), day)")
      expected = datetime(2016, 11, 7, 0, 0, 0)
      assert result == expected
  
      result = datetime_eval("datetrunc(datetime('now'), week)")
      expected = datetime(2016, 11, 7, 0, 0, 0)
      assert result == expected
  
      result = datetime_eval("datetrunc(datetime('now'), hour)")
      expected = datetime(2016, 11, 7, 9, 0, 0)
      assert result == expected
  
      result = datetime_eval("datetrunc(datetime('now'), minute)")
      expected = datetime(2016, 11, 7, 9, 30, 0)
      assert result == expected
  
      result = datetime_eval("datetrunc(datetime('now'), second)")
      expected = datetime(2016, 11, 7, 9, 30, 10)
      assert result == expected
  
      result = datetime_eval("lastday(datetime('now'), year)")
      expected = datetime(2016, 12, 31, 0, 0, 0)
      assert result == expected
  
      result = datetime_eval("lastday(datetime('today'), month)")
      expected = datetime(2016, 11, 30, 0, 0, 0)
      assert result == expected
  
      result = datetime_eval("holiday('Christmas')")
      expected = datetime(2016, 12, 25, 0, 0, 0)
      assert result == expected
  
      result = datetime_eval(
          "holiday('Labor day', datetime('2018-01-01T00:00:00'))"
      )
      expected = datetime(2018, 9, 3, 0, 0, 0)
      assert result == expected
  
      result = datetime_eval(
          "holiday('Eid al-Fitr', datetime('2000-01-01T00:00:00'), 'SA')"
      )
      expected = datetime(2000, 1, 8, 0, 0, 0)
      assert result == expected
  
      result = datetime_eval(
          "holiday('Boxing day', datetime('2018-01-01T00:00:00'), 'UK')"
      )
      expected = datetime(2018, 12, 26, 0, 0, 0)
      assert result == expected
  
      result = datetime_eval(
          "holiday('Juneteenth', datetime('2022-01-01T00:00:00'), 'US')"
      )
      expected = datetime(2022, 6, 19, 0, 0, 0)
      assert result == expected
  
      result = datetime_eval(
          "holiday('Independence Day', datetime('2022-01-01T00:00:00'), 'US')"
      )
      expected = datetime(2022, 7, 4, 0, 0, 0)
      assert result == expected
  
      result = datetime_eval(
          "lastday(dateadd(datetime('2018-01-01T00:00:00'), 1, month), month)"
      )
      expected = datetime(2018, 2, 28, 0, 0, 0)
      assert result == expected
  
file_path: superset/tests/unit_tests/utils/date_parser_tests.py
imports: import re
  from datetime import date, datetime, timedelta
  from typing import Optional
  from unittest.mock import Mock, patch
  import pytest
  from dateutil.relativedelta import relativedelta
  from superset.commands.chart.exceptions import TimeRangeAmbiguousError, TimeRangeParseFailError
  from superset.utils.date_parser import DateRangeMigration, datetime_eval, get_past_or_future, get_since_until, parse_human_datetime, parse_human_timedelta, parse_past_timedelta
label_desc: Use image node_id 3 for calling a global function with example usage: test_datetime_eval() without return types