def loss(test_params):
    x_final = minimize_structure(test_params)
    return jnp.sum(jnp.sin((1.0 - x_final)))
def loss(test_params):
    x_final = minimize_structure(test_params)
    return jnp.sum(jnp.sin((1.0 - x_final)))