docs: def last_heart_rate(self):
          """Return avg heart rate for last session."""
          try:
              rates = self.intervals[1]['timeseries']['heartRate']
          except KeyError:
              return None
          tmp = 0
          num_rates = len(rates)
  
          if num_rates == 0:
              return None
  
          for rate in rates:
              tmp += rate[1]
          rateavg = tmp/num_rates
          return rateavg