def parse_metric_family(buf):
 n = 0
 while (n < len(buf)):
  (msg_len, new_pos) = _DecodeVarint32(buf, n)
  n = new_pos
  msg_buf = buf[n:(n + msg_len)]
  n += msg_len
  message = metrics_pb2.MetricFamily()
  message.ParseFromString(msg_buf)
  (yield message)

def parse_metric_family ( buf ) : n = 0 while ( n < len ( buf ) ) : ( msg_len , new_pos ) = _DecodeVarint32 ( buf , n ) n = new_pos msg_buf = buf [ n : ( n + msg_len ) ] n += msg_len message = metrics_pb2 . MetricFamily ( ) message . ParseFromString ( msg_buf ) ( yield message )
parse the binary buffer in input .