code: def truncate_date_to_first_of_month(
          dt: Optional[DateLikeType]) -> Optional[DateLikeType]:
      
      if dt is None:
          return None
      return dt.replace(day=1)
docs: Change the day to the first of the month.