<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def create( cls, node: Union[Node, str], level: Union[RaidLevel, str], devices: Iterable[Union[BlockDevice, Partition]], *, name: str = None, uuid: str = None, spare_devices: Iterable[Union[BlockDevice, Partition]]):
 """ Create a RAID on a Node. :param node: Node to create the interface on. :type node: `Node` or `str` :param level: RAID level. :type level: `RaidLevel` :param devices: Mixed list of block devices or partitions to create the RAID from. :type devices: iterable of mixed type of `BlockDevice` or `Partition` :param name: Name of the RAID (optional). :type name: `str` :param uuid: The UUID for the RAID (optional). :type uuid: `str` :param spare_devices: Mixed list of block devices or partitions to add as spare devices on the RAID. :type spare_devices: iterable of mixed type of `BlockDevice` or `Partition` """

        if isinstance(level, RaidLevel):
            level = level.value
        params = {
            'level': str(level),
        }
        if isinstance(node, str):
            params['system_id'] = node
        elif isinstance(node, Node):
            params['system_id'] = node.system_id
        else:
            raise TypeError(
                'node must be a Node or str, not %s' % (
                    type(node).__name__))

        if len(devices) == 0:
            raise ValueError("devices must contain at least one device.")

        block_devices = []
        partitions = []
        for idx, device in enumerate(devices):
            if isinstance(device, BlockDevice):
                block_devices.append(device.id)
            elif isinstance(device, Partition):
                partitions.append(device.id)
            else:
                raise TypeError(
                    "devices[%d] must be a BlockDevice or "
                    "Partition, not %s" % type(device).__name__)
        if len(block_devices) > 0:
            params['block_devices'] = block_devices
        if len(partitions) > 0:
            params['partitions'] = partitions

        spare_block_devices = []
        spare_partitions = []
        for idx, device in enumerate(spare_devices):
            if isinstance(device, BlockDevice):
                spare_block_devices.append(device.id)
            elif isinstance(device, Partition):
                spare_partitions.append(device.id)
            else:
                raise TypeError(
                    "spare_devices[%d] must be a BlockDevice or "
                    "Partition, not %s" % type(device).__name__)
        if len(spare_block_devices) > 0:
            params['spare_devices'] = spare_block_devices
        if len(spare_partitions) > 0:
            params['spare_partitions'] = spare_partitions

        if name is not None:
            params['name'] = name
        if uuid is not None:
            params['uuid'] = uuid
        return cls._object(await cls._handler.create(**params))