You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: arrays.rs
    path of file: ./repos/solang/tests/polkadot_tests
    
    the code of the file until where you have to start completion: // SPDX-License-Identifier: Apache-2.0

use parity_scale_codec::{Decode, Encode};
use primitive_types::U256;
use rand::Rng;

use crate::build_
    
fn struct_array_struct_abi() {
    #[derive(Debug, PartialEq, Eq, Encode, Decode)]
    struct Foo {
        f1: u32,
        f2: bool,
    }

    #[derive(Debug, PartialEq, Eq, Encode, Decode)]
    struct Bar {
        bars: [Foo; 10],
    }

    let mut runtime = build_solidity(
        r##"
        contract flipper {
            struct foo {
                int32 f1;
                bool f2;
            }

            struct bar  {
                foo[10] bars;
            }

            bar s;

            function get_bar() public returns (bar) {
                bar memory a = bar({ bars: [
                    foo({ f1: 1, f2: true}),
                    foo({ f1: 2, f2: true}),
                    foo({ f1: 3, f2: true}),
                    foo({ f1: 4, f2: true}),
                    foo({ f1: 5, f2: true}),
                    foo({ f1: 6, f2: true}),
                    foo({ f1: 7, f2: false}),
                    foo({ f1: 8, f2: true}),
                    foo({ f1: 9, f2: true}),
                    foo({ f1: 10, f2: true})
                ]});

                s = a;

                return a;
            }

            function set_bar(bar memory a) public {
                for (uint32 i = 0; i < 10; i++) {
                    assert(a.bars[i].f1 == i + 1);
                    assert(a.bars[i].f2 == (i != 6));
                }

                a = s;
            }
        }"##,
    );

    let b = Bar {
        bars: [
            Foo { f1: 1, f2: true },
            Foo { f1: 2, f2: true },
            Foo { f1: 3, f2: true },
            Foo { f1: 4, f2: true },
            Foo { f1: 5, f2: true },
            Foo { f1: 6, f2: true },
            Foo { f1: 7, f2: false },
            Foo { f1: 8, f2: true },
            Foo { f1: 9, f2: true },
            Foo { f1: 10, f2: true },
        ],
    };

    runtime.function("get_bar", Vec::new());

    assert_eq!(runtime.output(), b.encode());

    runtime.function("set_bar", b.encode());
}