docs: def _get_analysis_period_subset(self, a_per):
          """Return an analysis_period is always a subset of the Data Collection"""
          if self.header.analysis_period.is_annual:
              return a_per
  
          new_needed = False
          n_ap = [a_per.st_month, a_per.st_day, a_per.st_hour,
                  a_per.end_month, a_per.end_day, a_per.end_hour,
                  a_per.timestep, a_per.is_leap_year]
          if a_per.st_hour < self.header.analysis_period.st_hour:
              n_ap[2] = self.header.analysis_period.st_hour
              new_needed = True
          if a_per.end_hour > self.header.analysis_period.end_hour:
              n_ap[5] = self.header.analysis_period.end_hour
              new_needed = True
          if a_per.st_time.doy < self.header.analysis_period.st_time.doy:
              n_ap[0] = self.header.analysis_period.st_month
              n_ap[1] = self.header.analysis_period.st_day
              new_needed = True
          if a_per.end_time.doy > self.header.analysis_period.end_time.doy:
              n_ap[3] = self.header.analysis_period.end_month
              n_ap[4] = self.header.analysis_period.end_day
              new_needed = True
          if new_needed is False:
              return a_per
          else:
              return AnalysisPeriod(*n_ap)