code: def parse(cls, string):
          
          match = re.match(r'^(?P<name>[A-Za-z0-9\.\-_]+)\s+' +
                           '(?P<value>[0-9\.]+)\s+' +
                           '(?P<timestamp>[0-9\.]+)(\n?)$',
                           string)
          try:
              groups = match.groupdict()
              # TODO: get precision from value string
              return Metric(groups['name'],
                            groups['value'],
                            float(groups['timestamp']))
          except:
              raise DiamondException(
                  "Metric could not be parsed from string: %s." % string)
docs: Parse a string and create a metric