def save(self):
        tmp_path = self.path + '.tmp'
        with open(tmp_path, 'w') as f:
            f.write(json.dumps(self.body_labels.items()))
        os.rename(tmp_path, self.path)
def _scale_vars(s, v_list):
  """Scale all variables in v_list by s."""
  return [s * v for v in v_list]