code: def biz_day_month(rdate):
      r"""Calculate the business day of the month.
  
      Parameters
      ----------
      rdate : int
          RDate date format.
  
      Returns
      -------
      bdm : int
          Business day of month.
      """
  
      gyear, gmonth, _ = rdate_to_gdate(rdate)
      rdate1 = gdate_to_rdate(gyear, gmonth, 1)
  
      bdm = 0
      index_date = rdate1
      while index_date <= rdate:
          dw = day_of_week(index_date)
          week_day = dw >= 1 and dw <= 5
          if week_day:
              bdm += 1
          index_date += 1
  
      holidays = set_holidays(gyear, True)
      for h in holidays:
          holiday = holidays[h]
          in_period = holiday >= rdate1 and holiday <= rdate
          dwh = day_of_week(holiday)
          week_day = dwh >= 1 and dwh <= 5
          if in_period and week_day:
              bdm -= 1
      return bdm
  
imports: import calendar
  import logging
  import math
  import pandas
label_desc: Use image node_id 2 for calling a global function with example usage: biz_day_month(rdate) and returns: bdm