code: def _first_of_month(self, day_of_week):
          
          dt = self.start_of("day")
  
          if day_of_week is None:
              return dt.set(day=1)
  
          month = calendar.monthcalendar(dt.year, dt.month)
  
          calendar_day = (day_of_week - 1) % 7
  
          if month[0][calendar_day] > 0:
              day_of_month = month[0][calendar_day]
          else:
              day_of_month = month[1][calendar_day]
  
          return dt.set(day=day_of_month)
docs: Modify to the first occurrence of a given day of the week
          in the current month. If no day_of_week is provided,
          modify to the first day of the month. Use the supplied consts
          to indicate the desired day_of_week, ex. DateTime.MONDAY.
  
          :type day_of_week: int
  
          :rtype: DateTime