Python: to_i on a enum may fail, if a enum is not parsed as known
Proposed fix is to replace Enum to IntEnum in

https://github.com/kaitai-io/kaitai_struct_compiler/blob/8d5308dc6591f82cd7e1bd0233af2772b5f68db8/shared/src/main/scala/io/kaitai/struct/languages/PythonCompiler.scala#L462

https://github.com/kaitai-io/kaitai_struct_compiler/blob/8d5308dc6591f82cd7e1bd0233af2772b5f68db8/shared/src/main/scala/io/kaitai/struct/languages/PythonCompiler.scala#L465

and use

```scala
override def enumToInt(v: Ast.expr, et: EnumType): String = s"int(${translate(v)})"
```

in

https://github.com/kaitai-io/kaitai_struct_compiler/blob/61a577cb67e1fb7e3d9c6603554c36e7c6f47849/shared/src/main/scala/io/kaitai/struct/translators/PythonTranslator.scala#L84L85


Also, `IntEnum`s can be interacted to numbers without explicit casting at all - they inherit `int`. Should we allow such for all the targets and determine if casting is needed automatically and apply it implicitly?

UPD: thanks for fixing this in a timely fashion ;) I had to implement a workaround. https://github.com/kaitaiStructCompile/kaitaiStructCompile.py/blob/16eef312efea66593b5a1e1b07bab6fd33b1b3b8/kaitaiStructCompile/postprocessors.py#L12-L132