message: Do not assume hasattr is available in Metric.__del__
  Python does not guarantee that builtins are available by the time __del__
  is called, so using hasattr is unsafe.
diff: @@ -121,10 +121,14 @@ class Metric(object):
  self._metric = self._metric_methods[self._label_length].create(*args)
  def __del__(self):
  - if hasattr(self, '_metric'):
  + try:
  deleter = self._metric_methods[self._label_length].delete
  + metric = self._metric
  + except AttributeError:
  + return
  +
  if deleter is not None:
  - deleter(self._metric)
  + deleter(metric)
  def get_cell(self, *labels):
  """Retrieves the cell."""
  