human
Complete the below
def make_istatepersister_tests(fixture):

    ''''Create a TestCase for ``IStatePersister``.
    :param fixture: A fixture that returns a tuple of
    :class:`IStatePersister` provider and a 0-argument callable that
    returns a ``PersistentState``.'
    '''
assistant
#Here is the Python program you requested.
    class IStatePersisterTests(TestCase, ):
        '\n                                Tests    for    ``IStatePersister``    implementations.\n                                '
        def test_interface(self):
            '\n                                                The    object    implements    ``IStatePersister``.\n                                                '
            (state_persister, _get_state) = fixture(self)
            verifyObject(IStatePersister, state_persister)
        @given(dataset_id=uuids(), blockdevice_id=text())
        def test_records_blockdeviceid(self, dataset_id, blockdevice_id):
            '\n                                                Calling    ``record_ownership``    records    the    blockdevice\n                                                mapping    in    the    state.\n                                                '
            (state_persister, get_state) = fixture(self)
            d = state_persister.record_ownership(dataset_id=dataset_id, blockdevice_id=blockdevice_id)
            self.successResultOf(d)
            self.assertEqual(get_state().blockdevice_ownership[dataset_id], blockdevice_id)
        @given(dataset_id=uuids(), blockdevice_id=text(), other_blockdevice_id=text())
        def test_duplicate_blockdevice_id(self, dataset_id, blockdevice_id, other_blockdevice_id):
            '\n                                                Calling    ``record_ownership``    raises\n                                                ``DatasetAlreadyOwned``    if    the    dataset    already    has    a\n                                                associated    blockdevice.\n                                                '
            assume((blockdevice_id != other_blockdevice_id))
            (state_persister, get_state) = fixture(self)
            self.successResultOf(state_persister.record_ownership(dataset_id=dataset_id, blockdevice_id=blockdevice_id))
            self.failureResultOf(state_persister.record_ownership(dataset_id=dataset_id,...