In particular, the indent should be
```
                raise ValueError("function is not returning"
                                 " an array of the correct shape")

```
or
```
                raise ValueError(
                    "function is not returning an array of the correct shape")
```