static POST_PROCESS_BLOCKS(metaData, blocks) {
        if (blocks[BlockTypes.IMAGE] && blocks[BlockTypes.IMAGE].pixels) { //We need the image to flip everything else correctly
            const layers = [];
            const entities = [];
            let angle = null;

            if (blocks[BlockTypes.IMAGE].pixels.floor.length > 0) {
                layers.push(
                    new mapEntities.MapLayer({
                        pixels: blocks[BlockTypes.IMAGE].pixels.floor.sort(mapEntities.MapLayer.COORDINATE_TUPLE_SORT).flat(),
                        type: mapEntities.MapLayer.TYPE.FLOOR,
                    })
                );
            }

            if (blocks[BlockTypes.IMAGE].pixels.obstacle_strong.length > 0) {
                layers.push(
                    new mapEntities.MapLayer({
                        pixels: blocks[BlockTypes.IMAGE].pixels.obstacle_strong.sort(mapEntities.MapLayer.COORDINATE_TUPLE_SORT).flat(),
                        type: mapEntities.MapLayer.TYPE.WALL,
                    })
                );
            }

            Object.keys(blocks[BlockTypes.IMAGE].segments).forEach(segmentId => {
                if (blocks[BlockTypes.IMAGE].segments[segmentId].length === 0) {
                    return;
                }

                let isActive = false;

                if (blocks[BlockTypes.CURRENTLY_CLEANED_SEGMENTS]) {
                    isActive = blocks[BlockTypes.CURRENTLY_CLEANED_SEGMENTS].includes(segmentId);
                }

                layers.push(new mapEntities.MapLayer({
                    pixels: blocks[BlockTypes.IMAGE].segments[segmentId].sort(mapEntities.MapLayer.COORDINATE_TUPLE_SORT).flat(),
                    type: mapEntities.MapLayer.TYPE.SEGMENT,
                    metaData: {
                        segmentId: segmentId,
                        active: isActive
                    }
                }));
            });

            if (blocks[BlockTypes.PATH]) {
                const points = TransformRoborockCoordinateArraysToValetudoCoordinateArrays(blocks[BlockTypes.PATH].points);

                //Fallback angle calculation from path if it's not part of the position block
                if (
                    blocks[BlockTypes.ROBOT_POSITION] &&
                    (blocks[BlockTypes.ROBOT_POSITION].angle === null || blocks[BlockTypes.ROBOT_POSITION] === undefined)
                ) {
                    if (blocks[BlockTypes.PATH].points.length >= 4) {
                        angle = Math.round(Math.atan2(
                            points[points.length - 1] -
                            points[points.length - 3],

                            points[points.length - 2] -
                            points[points.length - 4]

                        ) * 180 / Math.PI);
                    }
                }

                if (points?.length > 0) {
                    entities.push(new mapEntities.PathMapEntity({
                        points: points,
                        type: mapEntities.PathMapEntity.TYPE.PATH
                    }));
                }
            }

            if (blocks[BlockTypes.GOTO_PREDICTED_PATH]) {
                const predictedPathPoints = TransformRoborockCoordinateArraysToValetudoCoordinateArrays(blocks[BlockTypes.GOTO_PREDICTED_PATH].points);

                if (predictedPathPoints?.length > 0) {
                    entities.push(new mapEntities.PathMapEntity({
                        points: predictedPathPoints,
                        type: mapEntities.PathMapEntity.TYPE.PREDICTED_PATH
                    }));
                }
            }

            if (blocks[BlockTypes.CHARGER_LOCATION]) {
                entities.push(new mapEntities.PointMapEntity({
                    points: TransformRoborockCoordinateArraysToValetudoCoordinateArrays(blocks[BlockTypes.CHARGER_LOCATION].position),
                    type: mapEntities.PointMapEntity.TYPE.CHARGER_LOCATION
                }));
            }

            if (blocks[BlockTypes.ROBOT_POSITION]) {
                if (blocks[BlockTypes.ROBOT_POSITION].angle !== null) {
                    angle = blocks[BlockTypes.ROBOT_POSITION].angle;
                }

                angle = angle !== null ? angle : 0; //fallback

                //Roborock uses -180 to +180 with 0 being the robot facing east
                //We're using 0-360 with 0 being the robot facing north
                angle = (angle + 450) % 360;

                entities.push(new mapEntities.PointMapEntity({
                    points: TransformRoborockCoordinateArraysToValetudoCoordinateArrays(blocks[BlockTypes.ROBOT_POSITION].position),
                    metaData: {
                        angle: angle
                    },
                    type: mapEntities.PointMapEntity.TYPE.ROBOT_POSITION
                }));
            }

            if (blocks[BlockTypes.GOTO_TARGET]) {
                entities.push(new mapEntities.PointMapEntity({
                    points:TransformRoborockCoordinateArraysToValetudoCoordinateArrays(blocks[BlockTypes.GOTO_TARGET].position),
                    type: mapEntities.PointMapEntity.TYPE.GO_TO_TARGET
                }));
            }

            if (blocks[BlockTypes.CURRENTLY_CLEANED_ZONES]) {
                blocks[BlockTypes.CURRENTLY_CLEANED_ZONES].forEach(zone => {
                    zone = TransformRoborockCoordinateArraysToValetudoCoordinateArrays(zone);

                    //Roborock specifies zones with only two coordinates so we need to add the missing ones
                    entities.push(new mapEntities.PolygonMapEntity({
                        type: mapEntities.PolygonMapEntity.TYPE.ACTIVE_ZONE,
                        points: [
                            zone[0],
                            zone[1],
                            zone[0],
                            zone[3],
                            zone[2],
                            zone[3],
                            zone[2],
                            zone[1]
                        ]
                    }));
                });
            }

            if (blocks[BlockTypes.NO_GO_AREAS]) {
                blocks[BlockTypes.NO_GO_AREAS].forEach(area => {
                    entities.push(new mapEntities.PolygonMapEntity({
                        points: TransformRoborockCoordinateArraysToValetudoCoordinateArrays(area),
                        type: mapEntities.PolygonMapEntity.TYPE.NO_GO_AREA
                    }));
                });
            }

            if (blocks[BlockTypes.NO_MOP_AREAS]) {
                blocks[BlockTypes.NO_MOP_AREAS].forEach(area => {
                    entities.push(new mapEntities.PolygonMapEntity({
                        points: TransformRoborockCoordinateArraysToValetudoCoordinateArrays(area),
                        type: mapEntities.PolygonMapEntity.TYPE.NO_MOP_AREA
                    }));
                });
            }

            if (blocks[BlockTypes.VIRTUAL_WALLS]) {
                blocks[BlockTypes.VIRTUAL_WALLS].forEach(wall => {
                    entities.push(new mapEntities.LineMapEntity({
                        points: TransformRoborockCoordinateArraysToValetudoCoordinateArrays(wall),
                        type: mapEntities.LineMapEntity.TYPE.VIRTUAL_WALL
                    }));
                });
            }

            if (blocks[BlockTypes.OBSTACLES]) {
                blocks[BlockTypes.OBSTACLES].forEach(obstacle => {
                    entities.push(new mapEntities.PointMapEntity({
                        points: TransformRoborockCoordinateArraysToValetudoCoordinateArrays(obstacle.position),
                        type: mapEntities.PointMapEntity.TYPE.OBSTACLE,
                        metaData: {
                            label: `${obstacle.type} (${obstacle.confidence})`
                        }
                    }));
                });

            }

            return new mapEntities.ValetudoMap({
                metaData: {
                    vendorMapId: metaData.map_index
                },
                size: {
                    x: 5120,
                    y: 5120
                },
                pixelSize: 5,
                layers: layers,
                entities: entities
            });
        } else {
            return null;
        }
    }
@param {object} metaData
@param {object} blocks
@returns {null|import("../../entities/map/ValetudoMap")}