class_docstr: HolidayCalendar implementation.
  
  Unlike BoundedHolidayCalendar, doesn't require specifying calendar bounds, and
  supports weekends and holiday supplied as `Tensor`s. However, it is
  (potentially significantly) slower than the dates.HolidayCalendar
  implementation.
class_docstr_tok: ["HolidayCalendar","implementation",".","Unlike","BoundedHolidayCalendar",",","does","n't","require","specifying","calendar","bounds",",","and","supports","weekends","and","holiday","supplied","as","`","Tensor","`","s",".","However",",","it","is","(","potentially","significantly",")","slower","than","the","dates.HolidayCalendar","implementation","."]
docstr: Applies roll in business day space.
docstr_tok: ["Applies","roll","in","business","day","space","."]
code: def _apply_roll_biz_space(
      self, date_tensor, biz_days, is_bizday, roll_convention
  ):
      """Applies roll in business day space."""
      if roll_convention == constants.BusinessDayConvention.NONE:
          # If no business convention is specified, return the current business
          # day.
          return biz_days
  
      if roll_convention == constants.BusinessDayConvention.FOLLOWING:
          return tf.where(is_bizday, biz_days, biz_days + 1)
  
      if roll_convention == constants.BusinessDayConvention.PRECEDING:
          return biz_days
  
      if (
          roll_convention
          == constants.BusinessDayConvention.MODIFIED_FOLLOWING
      ):
          maybe_prev_biz_day = biz_days
          maybe_next_biz_day = tf.where(
              is_bizday, biz_days, biz_days + 1
          )
          maybe_next_biz_ordinal = self._from_biz_space(
              maybe_next_biz_day
          )
          take_previous = tf.not_equal(
              _get_month(maybe_next_biz_ordinal), date_tensor.month()
          )
          return tf.where(
              take_previous, maybe_prev_biz_day, maybe_next_biz_day
          )
  
      if (
          roll_convention
          == constants.BusinessDayConvention.MODIFIED_PRECEDING
      ):
          maybe_prev_biz_day = biz_days
          maybe_next_biz_day = tf.where(
              is_bizday, biz_days, biz_days + 1
          )
          maybe_prev_biz_ordinal = self._from_biz_space(
              maybe_prev_biz_day
          )
          take_next = tf.not_equal(
              _get_month(maybe_prev_biz_ordinal), date_tensor.month()
          )
          return tf.where(
              take_next, maybe_next_biz_day, maybe_prev_biz_day
          )
  
      raise ValueError(
          "Unsupported roll convention: {}".format(roll_convention)
      )
  
file_path: tf-quant-finance/tf_quant_finance/datetime/unbounded_holiday_calendar.py
imports: 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 date_utils
  from tf_quant_finance.datetime import holiday_calendar
  from tf_quant_finance.datetime import holiday_utils
  from tf_quant_finance.datetime import periods
label_desc: Use image node_id 4 for calling the UnboundedHolidayCalendar obj's underlying member method code with example usage: obj._apply_roll_biz_space(date_tensor, biz_days, is_bizday, roll_convention) and returns: biz_days, tf, biz_days, tf, tf