def METHOD_NAME(self):
    def callback(code):
        if code == "r":
            return 0
        else:
            return 1
    f = getattr(self.module, "string_callback")
    r = f(callback)
    assert r == 0