@decorators.yes_if_nothing_inferred<EOL>def starred_assigned_stmts(self, node=None, context=None, assign_path=None):
<EOL>def _determine_starred_iteration_lookups(starred, target, lookups):<EOL><INDENT>itered = target.itered()<EOL>for index, element in enumerate(itered):<EOL><INDENT>if (<EOL>isinstance(element, nodes.Starred)<EOL>and element.value.name == starred.value.name<EOL>):<EOL><INDENT>lookups.append((index, len(itered)))<EOL>break<EOL><DEDENT>if isinstance(element, nodes.Tuple):<EOL><INDENT>lookups.append((index, len(element.itered())))<EOL>_determine_starred_iteration_lookups(starred, element, lookups)<EOL><DEDENT><DEDENT><DEDENT>stmt = self.statement()<EOL>if not isinstance(stmt, (nodes.Assign, nodes.For)):<EOL><INDENT>raise exceptions.InferenceError(<EOL>"<STR_LIT>" "<STR_LIT>",<EOL>node=self,<EOL>stmt=stmt,<EOL>unknown=node,<EOL>context=context,<EOL>)<EOL><DEDENT>if context is None:<EOL><INDENT>context = contextmod.InferenceContext()<EOL><DEDENT>if isinstance(stmt, nodes.Assign):<EOL><INDENT>value = stmt.value<EOL>lhs = stmt.targets[<NUM_LIT:0>]<EOL>if sum(<NUM_LIT:1> for _ in lhs.nodes_of_class(nodes.Starred)) > <NUM_LIT:1>:<EOL><INDENT>raise exceptions.InferenceError(<EOL>"<STR_LIT>" "<STR_LIT>",<EOL>node=self,<EOL>targets=lhs,<EOL>unknown=node,<EOL>context=context,<EOL>)<EOL><DEDENT>try:<EOL><INDENT>rhs = next(value.infer(context))<EOL><DEDENT>except exceptions.InferenceError:<EOL><INDENT>yield util.Uninferable<EOL>return<EOL><DEDENT>if rhs is util.Uninferable or not hasattr(rhs, "<STR_LIT>"):<EOL><INDENT>yield util.Uninferable<EOL>return<EOL><DEDENT>try:<EOL><INDENT>elts = collections.deque(rhs.itered())<EOL><DEDENT>except TypeError:<EOL><INDENT>yield util.Uninferable<EOL>return<EOL><DEDENT>for index, left_node in enumerate(lhs.elts):<EOL><INDENT>if not isinstance(left_node, nodes.Starred):<EOL><INDENT>if not elts:<EOL><INDENT>break<EOL><DEDENT>elts.popleft()<EOL>continue<EOL><DEDENT>lhs_elts = collections.deque(reversed(lhs.elts[index:]))<EOL>for right_node in lhs_elts:<EOL><INDENT>if not isinstance(right_node, nodes.Starred):<EOL><INDENT>if not elts:<EOL><INDENT>break<EOL><DEDENT>elts.pop()<EOL>continue<EOL><DEDENT>packed = nodes.List(<EOL>ctx=Store, parent=self, lineno=lhs.lineno, col_offset=lhs.col_offset<EOL>)<EOL>packed.postinit(elts=elts)<EOL>yield packed<EOL>break<EOL><DEDENT><DEDENT><DEDENT>if isinstance(stmt, nodes.For):<EOL><INDENT>try:<EOL><INDENT>inferred_iterable = next(stmt.iter.infer(context=context))<EOL><DEDENT>except exceptions.InferenceError:<EOL><INDENT>yield util.Uninferable<EOL>return<EOL><DEDENT>if inferred_iterable is util.Uninferable or not hasattr(<EOL>inferred_iterable, "<STR_LIT>"<EOL>):<EOL><INDENT>yield util.Uninferable<EOL>return<EOL><DEDENT>try:<EOL><INDENT>itered = inferred_iterable.itered()<EOL><DEDENT>except TypeError:<EOL><INDENT>yield util.Uninferable<EOL>return<EOL><DEDENT>target = stmt.target<EOL>if not isinstance(target, nodes.Tuple):<EOL><INDENT>raise exceptions.InferenceError(<EOL>"<STR_LIT>",<EOL>context=context,<EOL>)<EOL><DEDENT>lookups = []<EOL>_determine_starred_iteration_lookups(self, target, lookups)<EOL>if not lookups:<EOL><INDENT>raise exceptions.InferenceError(<EOL>"<STR_LIT>", context=context<EOL>)<EOL><DEDENT>last_element_index, last_element_length = lookups[-<NUM_LIT:1>]<EOL>is_starred_last = last_element_index == (last_element_length - <NUM_LIT:1>)<EOL>lookup_slice = slice(<EOL>last_element_index,<EOL>None if is_starred_last else (last_element_length - last_element_index),<EOL>)<EOL>lookups[-<NUM_LIT:1>] = lookup_slice<EOL>for element in itered:<EOL><INDENT>found_element = None<EOL>for lookup in lookups:<EOL><INDENT>if not hasattr(element, "<STR_LIT>"):<EOL><INDENT>break<EOL><DEDENT>if not isinstance(lookup, slice):<EOL><INDENT>lookup = lookup[<NUM_LIT:0>]<EOL><DEDENT>try:<EOL><INDENT>itered_inner_element = element.itered()<EOL>element = itered_inner_element[lookup]<EOL><DEDENT>except IndexError:<EOL><INDENT>break<EOL><DEDENT>except TypeError:<EOL><INDENT>yield util.Uninferable<EOL>return<EOL><DEDENT>else:<EOL><INDENT>found_element = element<EOL><DEDENT><DEDENT>unpacked = nodes.List(<EOL>ctx=Store, parent=self, lineno=self.lineno, col_offset=self.col_offset<EOL>)<EOL>unpacked.postinit(elts=found_element or [])<EOL>yield unpacked<EOL>return<EOL><DEDENT>yield util.Uninferable<EOL><DEDENT>
Arguments:
    self: nodes.Starred
    node: a node related to the current underlying Node.
    context: Inference context used for caching already inferred objects
    assign_path:
        A list of indices, where each index specifies what item to fetch from
        the inference results.