code: def test_date_range_migration() -> None:
      params = '{"time_range": "   8 days     : 2020-03-10T00:00:00"}'
      assert re.search(DateRangeMigration.x_dateunit_in_since, params)
  
      params = '{"time_range": "2020-03-10T00:00:00 :    8 days    "}'
      assert re.search(DateRangeMigration.x_dateunit_in_until, params)
  
      params = '{"time_range": "   2 weeks    :    8 days    "}'
      assert re.search(DateRangeMigration.x_dateunit_in_since, params)
      assert re.search(DateRangeMigration.x_dateunit_in_until, params)
  
      params = '{"time_range": "2 weeks ago : 8 days later"}'
      assert not re.search(
          DateRangeMigration.x_dateunit_in_since, params
      )
      assert not re.search(
          DateRangeMigration.x_dateunit_in_until, params
      )
  
      field = "   8 days   "
      assert re.search(DateRangeMigration.x_dateunit, field)
  
      field = "last week"
      assert not re.search(DateRangeMigration.x_dateunit, field)
  
      field = "10 years ago"
      assert not re.search(DateRangeMigration.x_dateunit, field)
  
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 8 for calling a global function with example usage: test_date_range_migration() without return types