code: def leap_days_between(start_date, end_date):
      """Calculates number of leap days (29 Feb) between two dates.
  
      'start_date' is included and 'end_date' is excluded from the period.
  
      For example, for dates `2019-12-24` and `2024-3-10` the result is
      2: there is 29 Feb 2020 and 29 Feb 2024 between 24 Dec 2019 (inclusive) and
      10 Mar 2024 (exclusive).
  
      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 leap_days_since_year_0(date_tensor):
          year = date_tensor.year()
          month = date_tensor.month()
          leap_years_since_0 = year // 4 - year // 100 + year // 400
          needs_adjustment = is_leap_year(year) & (month <= 2)
          return leap_years_since_0 - tf.where(needs_adjustment, 1, 0)
  
      return leap_days_since_year_0(end_date) - leap_days_since_year_0(
          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 8 for calling a global function with example usage: leap_days_between(start_date, end_date) and returns: unknown, unknown