def METHOD_NAME(self, name, new_reactor):
    """
    Patch ``name`` so that Twisted will grab a fake reactor instead of
    a real one.
    """
    if hasattr(twisted.internet, name):
        self.patch(twisted.internet, name, new_reactor)
    else:
        def _cleanup():
            delattr(twisted.internet, name)
        setattr(twisted.internet, name, new_reactor)