def _loop_exits_early(loop):
    '\n    Returns true if a loop may ends up in a break statement.\n\n    Args:\n        loop (astroid.For, astroid.While): the loop node inspected.\n\n    Returns:\n        bool: True if the loop may ends up in a break statement, False otherwise.\n    '
    loop_nodes = (astroid.For, astroid.While)
    definition_nodes = (astroid.FunctionDef, astroid.ClassDef)
    inner_loop_nodes = [_node for _node in loop.nodes_of_class(loop_nodes, skip_klass=definition_nodes) if (_node != loop)]
    return any((_node for _node in loop.nodes_of_class(astroid.Break, skip_klass=definition_nodes) if (_get_break_loop_node(_node) not in inner_loop_nodes)))
Returns true if a loop may ends up in a break statement.

Args:
    loop (astroid.For, astroid.While): the loop node inspected.

Returns:
    bool: True if the loop may ends up in a break statement, False otherwise.
def _loop_exits_early(loop):
    '\n    Returns true if a loop may ends up in a break statement.\n\n    Args:\n        loop (astroid.For, astroid.While): the loop node inspected.\n\n    Returns:\n        bool: True if the loop may ends up in a break statement, False otherwise.\n    '
    loop_nodes = (astroid.For, astroid.While)
    definition_nodes = (astroid.FunctionDef, astroid.ClassDef)
    inner_loop_nodes = [_node for _node in loop.nodes_of_class(loop_nodes, skip_klass=definition_nodes) if (_node != loop)]
    return any((_node for _node in loop.nodes_of_class(astroid.Break, skip_klass=definition_nodes) if (_get_break_loop_node(_node) not in inner_loop_nodes)))