def current_resp_rate(self):
        """Return current respiratory rate for in-progress session."""
        try:
            rates = self.intervals[0]['timeseries']['respiratoryRate']
            num_rates = len(rates)

            if num_rates == 0:
                return None

            rate = rates[num_rates-1][1]
        except KeyError:
            rate = None
        return rate
def current_resp_rate ( self ) : try : rates = self . intervals [ 0 ] [ 'timeseries' ] [ 'respiratoryRate' ] num_rates = len ( rates ) if num_rates == 0 : return None rate = rates [ num_rates - 1 ] [ 1 ] except KeyError : rate = None return rate
Return current respiratory rate for in-progress session.