code: def business_day_mappers(weekend_mask=None, holidays=None):
      """Returns functions to map from ordinal to biz day and back."""
      if weekend_mask is None and holidays is None:
          return (lambda x: (x, tf.ones_like(x, dtype=tf.bool))), (
              lambda x: x
          )
  
      weekday_fwd, weekday_back = _week_day_mappers(weekend_mask)
  
      if holidays is None:
          return weekday_fwd, weekday_back
  
      # Apply the weekend adjustment to the holidays as well
      holidays_raw = tf.convert_to_tensor(holidays, dtype=tf.int32)
      holidays, is_weekday = weekday_fwd(holidays_raw)
  
      # Keep only the holidays that are not on weekends
      holidays = holidays[is_weekday]
  
      # The above step can lead to an empty holidays set which causes problems.
      # To mitigate this, we add a safe fake holiday.
      holidays = tf.concat([[0], holidays], axis=0)
      reverse_holidays = tf.reverse(-holidays, axis=[0])
      num_holidays = tf.size(holidays) - 1
  
      def bizday_fwd(x):
          """Calculates business day ordinal and whether it is a business day."""
          left = tf.searchsorted(holidays, x, side="left")
          right = num_holidays - tf.searchsorted(
              reverse_holidays, -x, side="left"
          )
          is_bizday = tf.not_equal(left, right)
          bizday_ordinal = x - right
          return bizday_ordinal, is_bizday
  
      cum_holidays = tf.range(num_holidays + 1, dtype=holidays.dtype)
      bizday_at_holidays = holidays - cum_holidays
  
      def bizday_back(x):
          left = tf.searchsorted(bizday_at_holidays, x, side="left")
          ordinal = x + left - 1
          return ordinal
  
      def from_ordinal(ordinals):
          """Maps ordinals to business day and whether it is a work day."""
          ordinals = tf.convert_to_tensor(ordinals, dtype=tf.int32)
          weekday_values, is_weekday = weekday_fwd(ordinals)
          biz_ordinal, is_bizday = bizday_fwd(weekday_values)
          return biz_ordinal, (is_weekday & is_bizday)
  
      def to_ordinal(biz_values):
          """Maps from business day count to ordinals."""
          return weekday_back(bizday_back(biz_values))
  
      return from_ordinal, to_ordinal
  
label_desc: Use image node_id 1 for calling a global function with example usage: business_day_mappers(weekend_mask, holidays) and returns: from_ordinal,  to_ordinal, function,  function, weekday_fwd,  weekday_back, bizday_ordinal,  is_bizday, ordinal, biz_ordinal,  unknown, weekday_back