def METHOD_NAME(self):
    raise NotImplementedError("NanInfTracer has no member named post_hook. "
                              "Please use forward_post_hook and backward_post_hook for forward and backward respectively instead.")