code: def test_days_ago(self):
      today = pendulum.today()
      today_midnight = pendulum.instance(
          datetime.fromordinal(today.date().toordinal())
      )
  
      assert dates.days_ago(0) == today_midnight
      assert dates.days_ago(100) == today_midnight + timedelta(
          days=-100
      )
  
      assert dates.days_ago(0, hour=3) == today_midnight + timedelta(
          hours=3
      )
      assert dates.days_ago(0, minute=3) == today_midnight + timedelta(
          minutes=3
      )
      assert dates.days_ago(0, second=3) == today_midnight + timedelta(
          seconds=3
      )
      assert dates.days_ago(
          0, microsecond=3
      ) == today_midnight + timedelta(microseconds=3)
  
file_path: airflow/tests/utils/test_dates.py
imports: from __future__ import annotations
  from datetime import datetime, timedelta
  import pendulum
  import pytest
  from dateutil.relativedelta import relativedelta
  from airflow.utils import dates, timezone
label_desc: Use image node_id 1 for calling the TestDates obj's underlying member method code with example usage: obj.test_days_ago() without return types