<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_stddevs(self, C, rup, shape, stddev_types):

 """
 Return standard deviations as defined in p. 971.
 """

        weight = self._compute_weight_std(C, rup.mag)
        std_intra = weight * C["sd1"] * np.ones(shape)
        std_inter = weight * C["sd2"] * np.ones(shape)
        
        stddevs = []
        for stddev_type in stddev_types:
            assert stddev_type in self.DEFINED_FOR_STANDARD_DEVIATION_TYPES
            if stddev_type == const.StdDev.TOTAL:
                stddevs.append(np.sqrt(std_intra ** 2. + std_inter ** 2.))
            elif stddev_type == const.StdDev.INTRA_EVENT:
                stddevs.append(std_intra)
            elif stddev_type == const.StdDev.INTER_EVENT:
                stddevs.append(std_inter)
        return stddevs