def __solve_for_repeated(expr, vars):
var = solve(expr, vars).value<EOL>if (var and isinstance(var, (tuple, list))<EOL>and protocol.implements(var[<NUM_LIT:0>], structured.IStructured)):<EOL><INDENT>return repeated.meld(*var), False<EOL><DEDENT>return var, repeated.isrepeating(var)<EOL>
Helper: solve 'expr' always returning an IRepeated.

    If the result of solving 'expr' is a list or a tuple of IStructured objects
    then treat is as a repeated value of IStructured objects because that's
    what the called meant to do. This is a convenience helper so users of the
    API don't have to create IRepeated objects.

    If the result of solving 'expr' is a scalar then return it as a repeated
    value of one element.

    Arguments:
        expr: Expression to solve.
        vars: The scope.

    Returns:
        IRepeated result of solving 'expr'.
        A booelan to indicate whether the original was repeating.