def test_shapes_band1_as_mask(runner, pixelated_image, pixelated_image_file):

    pixelated_image[2:3, 2:3] = 4

    with rasterio.open(pixelated_image_file, 'r+') as out:
        out.write(pixelated_image, indexes=1)

    result = runner.invoke(
        main_group,
        ['shapes', pixelated_image_file, '--band', '--bidx', '1', '--as-mask'])

    assert result.exit_code == 0
    assert result.output.count('"FeatureCollection"') == 1
    assert result.output.count('"Feature"') == 3
    assert numpy.allclose(
        json.loads(result.output)['features'][1]['geometry']['coordinates'],
        [[[2, 2], [2, 5], [5, 5], [5, 2], [2, 2]]])
Provide TreeNode with a parent for the current node.  This function
dataset/ETHPy150Open mapbox/rasterio/tests/test_rio_features.py/test_shapes_band1_as_mask--crossover with--dataset/ETHPy150Open AnyMesh/anyMesh-Python/example/urwid/treetools.py/TreeNode.load_parent