human
Complete this python program:
def make_createblockdevicedataset_mixin(profiled_api):
assistant
#Here is the Python code you requested.

    """Constructs a base class for tests that verify the implementation of
    ``CreateBlockDeviceDataset``.
    This ``IStateChange`` needs to be tested in two configurations:
    1) With an ``IBlockDeviceAPI`` provider that does not provide
    ``IProfiledBlockDeviceAPI``.
    2) With an ``IBlockDeviceAPI`` that does provide
    ``IProfiledBlockDeviceAPI``.
    The mixin holds utility functions that are useful in both configurations,
    and takes care of initializing the two different versions of the API.
    :param bool profiled_api: True if you want self.api to be an implementation
    of ``IBlockDeviceAPI`` that provides ``IProfiledBlockDeviceAPI``. False
    if you want self.api not to provide ``IProfiledBlockDeviceAPI``.
    """
    class Mixin(CreateBlockDeviceDatasetImplementationMixin, TestCase, ):
        def setUp(self):
            super(Mixin, self).setUp()
            if profiled_api:
                self.api = fakeprofiledloopbackblockdeviceapi_for_test(self, allocation_unit=LOOPBACK_ALLOCATION_UNIT)
            else:
                self.api = loopbackblockdeviceapi_for_test(self, allocation_unit=LOOPBACK_ALLOCATION_UNIT)
            self.mountroot = mountroot_for_test(self)
            self.deployer = BlockDeviceDeployer(node_uuid=uuid4(), hostname=u'192.0.2.10', block_device_api=self.api, mountroot=self.mountroot)
    return Mixin