code: def days_in_leap_years_between(start_date, end_date):
      """Calculates number of days between two dates that fall on leap years.
  
      'start_date' is included and 'end_date' is excluded from the period.
  
      For example, for dates `2019-12-24` and `2024-2-10` the result is
      406: 366 days in 2020, 31 in Jan 2024 and 9 in Feb 2024.
  
      If `end_date` is earlier than `start_date`, the result will be negative or
      zero.
  
      Args:
        start_date: DateTensor.
        end_date: DateTensor compatible with `start_date`.
  
      Returns:
        Tensor of type 'int32'.
      """
  
      def days_in_leap_years_since_1jan0001(date):
          prev_year = date.year() - 1
          leap_years_before = (
              prev_year // 4 - prev_year // 100 + prev_year // 400
          )
          n_leap_days = leap_years_before * 366
  
          days_in_cur_year = (
              date.day_of_year() - 1
          )  # exclude current day.
          n_leap_days += tf.where(
              is_leap_year(date.year()), days_in_cur_year, 0
          )
          return n_leap_days
  
      return days_in_leap_years_since_1jan0001(
          end_date
      ) - days_in_leap_years_since_1jan0001(start_date)
  
file_path: tf-quant-finance/tf_quant_finance/datetime/date_utils.py
imports: import tensorflow.compat.v2
label_desc: Use image node_id 6 for calling a global function with example usage: days_in_leap_years_between(start_date, end_date) and returns: unknown, n_leap_days