original_docstring: 
      Helper method to perform retention check.
  
      Arguments:
          disable_retention_check: bool to disable retention check
          year: year of the report
          month: month of the report
          config: DIRBS config object
          logger: DIRBS logger object
      Returns:
          None
      
docstring: Helper method to perform retention check.
docstring_tokens: Helper method to perform retention check .
code: def _retention_window_check(disable_retention_check: bool, year: int, month: int,
                              config: callable, logger: callable) -> None:
      """
      Helper method to perform retention check.
  
      Arguments:
          disable_retention_check: bool to disable retention check
          year: year of the report
          month: month of the report
          config: DIRBS config object
          logger: DIRBS logger object
      Returns:
          None
      """
      # DIRBS-371: Make sure that we fail if part of the month is outside the retention
      # window
      if not disable_retention_check:
          report_start_date = datetime.date(year, month, 1)
          curr_date = datetime.date.today()
          retention_months = config.retention_config.months_retention
          retention_window_start = datetime.date(curr_date.year, curr_date.month, 1) - \
              relativedelta.relativedelta(months=retention_months)
          if report_start_date < retention_window_start:
              logger.error('Attempting to generate a report for a period outside the retention window...')
              sys.exit(1)
code_tokens: def _retention_window_check ( disable_retention_check : bool , year : int , month : int , config : callable , logger : callable ) -> None : if not disable_retention_check : report_start_date = datetime . date ( year , month , 1 ) curr_date = datetime . date . today ( ) retention_months = config . retention_config . months_retention retention_window_start = datetime . date ( curr_date . year , curr_date . month , 1 ) - relativedelta . relativedelta ( months = retention_months ) if report_start_date < retention_window_start : logger . error ( 'Attempting to generate a report for a period outside the retention window...' ) sys . exit ( 1 )
short_docstring: Helper method to perform retention check.
short_docstring_tokens: Helper method to perform retention check .
comment: """
      Helper method to perform retention check.
  
      Arguments:
          disable_retention_check: bool to disable retention check
          year: year of the report
          month: month of the report
          config: DIRBS config object
          logger: DIRBS logger object
      Returns:
          None
      """$SEP$# DIRBS-371: Make sure that we fail if part of the month is outside the retention$SEP$# window