Fixed missing import and unreachable NotImplementedError