def parse_definition(self, line):
    try:
      left_side, right_side = line.split('=', 1)
      output_pattern, frequency = left_side.split()
      method, input_pattern = right_side.split()
      frequency = int( frequency.lstrip('(').rstrip(')') )
      return AggregationRule(input_pattern, output_pattern, method, frequency)

    except __HOLE__:
      log.err("Failed to parse line: %s" % line)
      raise
dataset/ETHPy150Open graphite-project/carbon/lib/carbon/aggregator/rules.py/RuleManager.parse_definition