Let's say I have a large set of Helm charts, in which I want to edit every `deployment.yaml` file in the `templates` directory of each chart, which doing manually is a tedious task.

I've tried to use Python's `pyyaml` and `benedict` to do something like this:

```
content = read_file() # reads the deployment.yaml file
deployment = yaml.unsafe_load(content)
deployment = benedict(deployment)

```

But I get this:

```
yaml.parser.ParserError: while parsing a flow node
expected the node content, but found '-'
  in "<unicode string>", line 3, column 4:
     {{- include "something.labels" ...

```

I suppose that since the `deployment.yaml` which is a Helm template is not a valid YAML, pyyaml can't decode it.

Does anyone know another way?