code: def _publish_metrics(self, prev_keys, key, data, publishfn=None):
          
          if key not in data:
              return
          value = data[key]
          keys = prev_keys + [key]
          if not publishfn:
              publishfn = self.publish
          if isinstance(value, dict):
              for new_key in value:
                  self._publish_metrics(keys, new_key, value)
          elif isinstance(value, int) or isinstance(value, float):
              publishfn('.'.join(keys), value)
          elif isinstance(value, long):
              publishfn('.'.join(keys), float(value))
docs: Recursively publish keys