def get_min_corner(sparse_voxel):
    """
    Voxel should either be a schematic, a list of ((x, y, z), (block_id, ?)) objects
    or a list of coordinates.
    Returns the minimum corner of the bounding box around the voxel.
    """
    if len(sparse_voxel) == 0:
        return [0, 0, 0]

    # A schematic
    if len(sparse_voxel[0]) == 2 and len(sparse_voxel[0][0]) == 3 and len(sparse_voxel[0][1]) == 2:
        x, y, z = list(zip(*list(zip(*sparse_voxel))[0]))
    # A list or coordinates
    elif len(sparse_voxel[0]) == 3:
        x, y, z = list(zip(*sparse_voxel))
    else:
        raise Exception("Unknown schematic format")
    return min(x), min(y), min(z)