Convert value to ast expression if size is not too big.

    Converter for sized container.

def size_container_folding(value):
    """
    Convert value to ast expression if size is not too big.

    Converter for sized container.
    """
    if len(value) < MAX_LEN:
        if isinstance(value, list):
            return ast.List([to_ast(elt) for elt in value], ast.Load())
        elif isinstance(value, tuple):
            return ast.Tuple([to_ast(elt) for elt in value], ast.Load())
        elif isinstance(value, set):
            return ast.Set([to_ast(elt) for elt in value])
        elif isinstance(value, dict):
            keys = [to_ast(elt) for elt in value.keys()]
            values = [to_ast(elt) for elt in value.values()]
            return ast.Dict(keys, values)
        elif isinstance(value, np.ndarray):
            return ast.Call(func=ast.Attribute(
                ast.Name(mangle('numpy'), ast.Load(), None),
                'array',
                ast.Load()),
                args=[to_ast(totuple(value.tolist())),
                      ast.Attribute(
                          ast.Name(mangle('numpy'), ast.Load(), None),
                          value.dtype.name,
                          ast.Load())],
                keywords=[])
        else:
            raise ConversionError()
    else:
        raise ToNotEval()