How to write a function. processing numpy ndarray with predictions like [0, 1, 1, 0..1. 0] int16 and placing it in a json file with form. It should look like: [{"idx&qu