class_docstr: HolidayCalendar implementation.
  
  Requires the calendar to be bounded. Constructs tables of precomputed values
  of interest for each day in the calendar, which enables better performance
  compared to a more flexible UnboundedHolidayCalendar.
  
  Each instance should be used in the context of only one graph. E.g. one can't
  create a BoundedHolidayCalendar in one tf.function and reuse it in another.
class_docstr_tok: ["HolidayCalendar","implementation",".","Requires","the","calendar","to","be","bounded",".","Constructs","tables","of","precomputed","values","of","interest","for","each","day","in","the","calendar",",","which","enables","better","performance","compared","to","a","more","flexible","UnboundedHolidayCalendar",".","Each","instance","should","be","used","in","the","context","of","only","one","graph",".","E.g",".","one","can't","create","a","BoundedHolidayCalendar","in","one","tf.function","and","reuse","it","in","another","."]
docstr: Calculates number of business between pairs of dates.
  
  For each pair, the initial date is included in the difference, and the final
  date is excluded. If the final date is the same or earlier than the initial
  date, zero is returned.
  
  Args:
    from_dates: DateTensor of initial dates.
    to_dates: DateTensor of final dates, should be broadcastable to
      `from_dates`.
  
  Returns:
     An int32 Tensor with the number of business days between the
     corresponding pairs of dates.
docstr_tok: ["Calculates","number","of","business","between","pairs","of","dates",".","For","each","pair",",","the","initial","date","is","included","in","the","difference",",","and","the","final","date","is","excluded",".","If","the","final","date","is","the","same","or","earlier","than","the","initial","date",",","zero","is","returned",".","Args",":","from_dates",":","DateTensor","of","initial","dates",".","to_dates",":","DateTensor","of","final","dates",",","should","be","broadcastable","to","`","from_dates","`",".","Returns",":","An","int32","Tensor","with","the","number","of","business","days","between","the","corresponding","pairs","of","dates","."]
code: def business_days_between(self, from_dates, to_dates):
      """Calculates number of business between pairs of dates.
  
      For each pair, the initial date is included in the difference, and the final
      date is excluded. If the final date is the same or earlier than the initial
      date, zero is returned.
  
      Args:
        from_dates: DateTensor of initial dates.
        to_dates: DateTensor of final dates, should be broadcastable to
          `from_dates`.
  
      Returns:
         An int32 Tensor with the number of business days between the
         corresponding pairs of dates.
      """
      cumul_bus_days_table = self._compute_cumul_bus_days_table()
      ordinals_1, ordinals_2 = from_dates.ordinal(), to_dates.ordinal()
      with tf.control_dependencies(
          self._assert_ordinals_in_bounds(ordinals_1)
          + self._assert_ordinals_in_bounds(ordinals_2)
      ):
          ordinals_2 = tf.broadcast_to(ordinals_2, ordinals_1.shape)
          cumul_bus_days_1 = self._gather(
              cumul_bus_days_table,
              ordinals_1 - self._ordinal_offset + 1,
          )
          cumul_bus_days_2 = self._gather(
              cumul_bus_days_table,
              ordinals_2 - self._ordinal_offset + 1,
          )
          return tf.math.maximum(cumul_bus_days_2 - cumul_bus_days_1, 0)
  
imports: import attr
  import tensorflow.compat.v2
  from tf_quant_finance.datetime import constants
  from tf_quant_finance.datetime import date_tensor
  from tf_quant_finance.datetime import holiday_calendar
  from tf_quant_finance.datetime import periods
label_desc: Use image node_id 9 for calling the BoundedHolidayCalendar obj's underlying member method code with example usage: obj.business_days_between(from_dates, to_dates) and returns: tf