code: def get_value(self, key):
          
          for title in _TITLES.get(key, ()) + (key,):
              try:
                  value = [entry['lastMeasurement']['value'] for entry in
                           self.data['sensors'] if entry['title'] == title][0]
                  return value
              except IndexError:
                  pass
          return None
docs: Extract a value for a given key.