def METHOD_NAME():
    with mock.patch.object(
        PersistentResourceServiceClient,
        "get_persistent_resource",
    ) as METHOD_NAME:
        METHOD_NAME.side_effect = Exception
        yield METHOD_NAME