code: def test_periodic_schedule_dynamic(
      self,
      start_dates,
      end_dates,
      period_quantities,
      period_type,
      backward,
      expected_schedule,
      end_of_month=False,
  ):
      start_dates = dates.dates_from_ordinals(
          [
              s + tf.compat.v1.placeholder_with_default(0, [])
              for s in start_dates
          ]
      )
      end_dates = dates.dates_from_ordinals(
          [
              s + tf.compat.v1.placeholder_with_default(0, [])
              for s in end_dates
          ]
      )
      tenors = dates.PeriodTensor(period_quantities, period_type)
      expected_schedule = dates.dates_from_np_datetimes(
          _to_np_datetimes(expected_schedule)
      )
      actual_schedule = dates.PeriodicSchedule(
          start_date=start_dates,
          end_date=end_dates,
          tenor=tenors,
          holiday_calendar=dates.create_holiday_calendar(
              weekend_mask=dates.WeekendMask.SATURDAY_SUNDAY,
              start_year=2020,
              end_year=2028,
          ),
          roll_convention=dates.BusinessDayConvention.MODIFIED_FOLLOWING,
          backward=backward,
          end_of_month=end_of_month,
      ).dates()
      self.assertAllEqual(
          expected_schedule.ordinal(), actual_schedule.ordinal()
      )
  
file_path: tf-quant-finance/tf_quant_finance/datetime/schedules_test.py
imports: import datetime
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tf_quant_finance.datetime import test_data
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 2 for calling the SchedulesTest obj's underlying member method code with example usage: obj.test_periodic_schedule_dynamic(start_dates, end_dates, period_quantities, period_type, backward, expected_schedule, end_of_month) without return types