def METHOD_NAME(self, node, results):
    if "isinstance" in results:
        return self.transform_isinstance(node, results)
    elif "while" in results:
        return self.transform_while(node, results)
    elif "sorted" in results:
        return self.transform_sort(node, results)
    else:
        raise RuntimeError("Invalid match")