def _eval_shape(shape: Sequence[shape_poly.DimSize]) -> Sequence[TfVal]:
    assert all(map((lambda x: (x is not None)), shape)), f'Argument shape should be a valid JAX shape but got {shape}'
    return tuple(((_shape_env[d] if (type(d) is shape_poly.DimVar) else d) for d in shape))
def _eval_shape(shape: Sequence[shape_poly.DimSize]) -> Sequence[TfVal]:
    assert all(map((lambda x: (x is not None)), shape)), f'Argument shape should be a valid JAX shape but got {shape}'
    return tuple(((_shape_env[d] if (type(d) is shape_poly.DimVar) else d) for d in shape))