def METHOD_NAME(self, line):
    for p in [self.hadoop, self.hadoop2]:
        m = p.METHOD_NAME(line)
        if m:
            return (float(m.groups()[0]) + float(m.groups()[1]))/2
    for p in [self.spark]:
        m = p.METHOD_NAME(line)
        if m:
            return float(m.groups()[0]) / float(m.groups()[1]) * 100