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: Computes and caches "is business day" table.
docstr_tok: ["Computes","and","caches","``","is","business","day","''","table","."]
code: def _compute_is_bus_day_table(self):
      """Computes and caches "is business day" table."""
      if self._table_cache.is_bus_day is not None:
          return self._table_cache.is_bus_day
  
      ordinals = tf.range(
          self._ordinal_offset,
          self._ordinal_offset + self._calendar_size,
      )
      # Apply weekend mask
      week_days = (ordinals - 1) % 7
      is_holiday = tf.gather(self._weekend_mask, week_days)
  
      # Apply holidays
      if self._holidays is not None:
          indices = self._holidays.ordinal() - self._ordinal_offset
          ones_at_indices = tf.scatter_nd(
              tf.expand_dims(indices, axis=-1),
              tf.ones_like(indices),
              is_holiday.shape,
          )
          is_holiday = tf.bitwise.bitwise_or(
              is_holiday, ones_at_indices
          )
  
      # Add a business day at the beginning and at the end, i.e. at 31 Dec of
      # start_year-1 and at 1 Jan of end_year+1. This trick is to avoid dealing
      # with special cases on boundaries.
      # For example, for Following and Preceding conventions we'd need a special
      # value that means "unknown" in the tables. More complicated conventions
      # then combine the Following and Preceding tables, and would need special
      # treatment of the "unknown" values.
      # With these "fake" business days, all computations are automatically
      # correct, unless we land on those extra days - for this reason we add
      # assertions in all API calls before returning.
      is_bus_day_table = tf.concat([[1], 1 - is_holiday, [1]], axis=0)
      self._table_cache.is_bus_day = is_bus_day_table
      return is_bus_day_table
  
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 12 for calling the BoundedHolidayCalendar obj's underlying member method code with example usage: obj._compute_is_bus_day_table() and returns: is_bus_day_table, self