prompt: getitem does not infer the actual unpacked value
  When trying to call `Dict.getitem()` on a context where we have a dict unpacking of anything beside a real dict, astroid currently raises an `AttributeError: 'getitem'`, which has 2 problems:
  
  - The object might be a reference against something constant, this pattern is usually seen when we have different sets of dicts that extend each other, and all of their values are inferrable. 
  - We can have something that is uninferable, but in that case instead of an `AttributeError` I think it makes sense to raise the usual `AstroidIndexError` which is supposed to be already handled by the downstream.
  
  
  Here is a short reproducer;
  
  ```py
  from astroid import parse
  
  
  source = """
  X = {
      'A': 'B'
  }
  
  Y = {
      **X
  }
  
  KEY = 'A'
  """
  
  tree = parse(source)
  
  first_dict = tree.body[0].value
  second_dict = tree.body[1].value
  key = tree.body[2].value
  
  print(f'{first_dict.getitem(key).value = }')
  print(f'{second_dict.getitem(key).value = }')
  
  
  ```
  
  The current output;
  
  ```
   $ python t1.py                                                                                                 3ms
  first_dict.getitem(key).value = 'B'
  Traceback (most recent call last):
    File "/home/isidentical/projects/astroid/t1.py", line 23, in <module>
      print(f'{second_dict.getitem(key).value = }')
    File "/home/isidentical/projects/astroid/astroid/nodes/node_classes.py", line 2254, in getitem
      return value.getitem(index, context)
  AttributeError: 'Name' object has no attribute 'getitem'
  ```
  
  Expeceted output;
  ```
   $ python t1.py                                                                                                 4ms
  first_dict.getitem(key).value = 'B'
  second_dict.getitem(key).value = 'B'
  
  ```
  
  
instance: {"FAIL_TO_PASS": "[\"tests/unittest_python3.py::Python3TC::test_unpacking_in_dict_getitem_uninferable\", \"tests/unittest_python3.py::Python3TC::test_unpacking_in_dict_getitem_with_ref\"]", "PASS_TO_PASS": "[\"tests/unittest_python3.py::Python3TC::test_annotation_as_string\", \"tests/unittest_python3.py::Python3TC::test_annotation_support\", \"tests/unittest_python3.py::Python3TC::test_as_string\", \"tests/unittest_python3.py::Python3TC::test_async_comprehensions\", \"tests/unittest_python3.py::Python3TC::test_async_comprehensions_as_string\", \"tests/unittest_python3.py::Python3TC::test_async_comprehensions_outside_coroutine\", \"tests/unittest_python3.py::Python3TC::test_format_string\", \"tests/unittest_python3.py::Python3TC::test_kwonlyargs_annotations_supper\", \"tests/unittest_python3.py::Python3TC::test_metaclass_ancestors\", \"tests/unittest_python3.py::Python3TC::test_metaclass_error\", \"tests/unittest_python3.py::Python3TC::test_metaclass_imported\", \"tests/unittest_python3.py::Python3TC::test_metaclass_multiple_keywords\", \"tests/unittest_python3.py::Python3TC::test_metaclass_yes_leak\", \"tests/unittest_python3.py::Python3TC::test_nested_unpacking_in_dicts\", \"tests/unittest_python3.py::Python3TC::test_old_syntax_works\", \"tests/unittest_python3.py::Python3TC::test_parent_metaclass\", \"tests/unittest_python3.py::Python3TC::test_simple_metaclass\", \"tests/unittest_python3.py::Python3TC::test_starred_notation\", \"tests/unittest_python3.py::Python3TC::test_underscores_in_numeral_literal\", \"tests/unittest_python3.py::Python3TC::test_unpacking_in_dict_getitem\", \"tests/unittest_python3.py::Python3TC::test_unpacking_in_dicts\", \"tests/unittest_python3.py::Python3TC::test_yield_from\", \"tests/unittest_python3.py::Python3TC::test_yield_from_as_string\", \"tests/unittest_python3.py::Python3TC::test_yield_from_is_generator\"]", "base_commit": "39c2a9805970ca57093d32bbaf0e6a63e05041d8", "created_at": "2021-10-03T15:58:07Z", "environment_setup_commit": "52f6d2d7722db383af035be929f18af5e9fe8cd5", "hints_text": "", "instance_id": "pylint-dev__astroid-1196", "patch": "diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py\n--- a/astroid/nodes/node_classes.py\n+++ b/astroid/nodes/node_classes.py\n@@ -2346,24 +2346,33 @@ def itered(self):\n         \"\"\"\n         return [key for (key, _) in self.items]\n \n-    def getitem(self, index, context=None):\n+    def getitem(\n+        self, index: Const | Slice, context: InferenceContext | None = None\n+    ) -> NodeNG:\n         \"\"\"Get an item from this node.\n \n         :param index: The node to use as a subscript index.\n-        :type index: Const or Slice\n \n         :raises AstroidTypeError: When the given index cannot be used as a\n             subscript index, or if this node is not subscriptable.\n         :raises AstroidIndexError: If the given index does not exist in the\n             dictionary.\n         \"\"\"\n+        # pylint: disable-next=import-outside-toplevel; circular import\n+        from astroid.helpers import safe_infer\n+\n         for key, value in self.items:\n             # TODO(cpopa): no support for overriding yet, {1:2, **{1: 3}}.\n             if isinstance(key, DictUnpack):\n+                inferred_value = safe_infer(value, context)\n+                if not isinstance(inferred_value, Dict):\n+                    continue\n+\n                 try:\n-                    return value.getitem(index, context)\n+                    return inferred_value.getitem(index, context)\n                 except (AstroidTypeError, AstroidIndexError):\n                     continue\n+\n             for inferredkey in key.infer(context):\n                 if inferredkey is util.Uninferable:\n                     continue\n", "problem_statement": "getitem does not infer the actual unpacked value\nWhen trying to call `Dict.getitem()` on a context where we have a dict unpacking of anything beside a real dict, astroid currently raises an `AttributeError: 'getitem'`, which has 2 problems:\r\n\r\n- The object might be a reference against something constant, this pattern is usually seen when we have different sets of dicts that extend each other, and all of their values are inferrable. \r\n- We can have something that is uninferable, but in that case instead of an `AttributeError` I think it makes sense to raise the usual `AstroidIndexError` which is supposed to be already handled by the downstream.\r\n\r\n\r\nHere is a short reproducer;\r\n\r\n```py\r\nfrom astroid import parse\r\n\r\n\r\nsource = \"\"\"\r\nX = {\r\n    'A': 'B'\r\n}\r\n\r\nY = {\r\n    **X\r\n}\r\n\r\nKEY = 'A'\r\n\"\"\"\r\n\r\ntree = parse(source)\r\n\r\nfirst_dict = tree.body[0].value\r\nsecond_dict = tree.body[1].value\r\nkey = tree.body[2].value\r\n\r\nprint(f'{first_dict.getitem(key).value = }')\r\nprint(f'{second_dict.getitem(key).value = }')\r\n\r\n\r\n```\r\n\r\nThe current output;\r\n\r\n```\r\n $ python t1.py                                                                                                 3ms\r\nfirst_dict.getitem(key).value = 'B'\r\nTraceback (most recent call last):\r\n  File \"/home/isidentical/projects/astroid/t1.py\", line 23, in <module>\r\n    print(f'{second_dict.getitem(key).value = }')\r\n  File \"/home/isidentical/projects/astroid/astroid/nodes/node_classes.py\", line 2254, in getitem\r\n    return value.getitem(index, context)\r\nAttributeError: 'Name' object has no attribute 'getitem'\r\n```\r\n\r\nExpeceted output;\r\n```\r\n $ python t1.py                                                                                                 4ms\r\nfirst_dict.getitem(key).value = 'B'\r\nsecond_dict.getitem(key).value = 'B'\r\n\r\n```\r\n\n", "repo": "pylint-dev/astroid", "test_patch": "diff --git a/tests/unittest_python3.py b/tests/unittest_python3.py\n--- a/tests/unittest_python3.py\n+++ b/tests/unittest_python3.py\n@@ -5,7 +5,9 @@\n import unittest\n from textwrap import dedent\n \n-from astroid import nodes\n+import pytest\n+\n+from astroid import exceptions, nodes\n from astroid.builder import AstroidBuilder, extract_node\n from astroid.test_utils import require_version\n \n@@ -285,6 +287,33 @@ def test_unpacking_in_dict_getitem(self) -> None:\n             self.assertIsInstance(value, nodes.Const)\n             self.assertEqual(value.value, expected)\n \n+    @staticmethod\n+    def test_unpacking_in_dict_getitem_with_ref() -> None:\n+        node = extract_node(\n+            \"\"\"\n+        a = {1: 2}\n+        {**a, 2: 3}  #@\n+        \"\"\"\n+        )\n+        assert isinstance(node, nodes.Dict)\n+\n+        for key, expected in ((1, 2), (2, 3)):\n+            value = node.getitem(nodes.Const(key))\n+            assert isinstance(value, nodes.Const)\n+            assert value.value == expected\n+\n+    @staticmethod\n+    def test_unpacking_in_dict_getitem_uninferable() -> None:\n+        node = extract_node(\"{**a, 2: 3}\")\n+        assert isinstance(node, nodes.Dict)\n+\n+        with pytest.raises(exceptions.AstroidIndexError):\n+            node.getitem(nodes.Const(1))\n+\n+        value = node.getitem(nodes.Const(2))\n+        assert isinstance(value, nodes.Const)\n+        assert value.value == 3\n+\n     def test_format_string(self) -> None:\n         code = \"f'{greetings} {person}'\"\n         node = extract_node(code)\n", "version": "2.12"}
parsed_commit_content: {"file_diffs":[{"old_file_content":"# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html\n# For details: https://github.com/PyCQA/astroid/blob/main/LICENSE\n# Copyright (c) https://github.com/PyCQA/astroid/blob/main/CONTRIBUTORS.txt\n\n\"\"\"Module for some node classes. More nodes in scoped_nodes.py\"\"\"\n\nfrom __future__ import annotations\n\nimport abc\nimport itertools\nimport sys\nimport typing\nimport warnings\nfrom collections.abc import Generator, Iterator\nfrom functools import lru_cache\nfrom typing import TYPE_CHECKING, Any, Callable, ClassVar, Optional, TypeVar, Union\n\nfrom astroid import decorators, mixins, util\nfrom astroid.bases import Instance, _infer_stmts\nfrom astroid.const import Context\nfrom astroid.context import InferenceContext\nfrom astroid.exceptions import (\n    AstroidIndexError,\n    AstroidTypeError,\n    InferenceError,\n    NoDefault,\n    ParentMissingError,\n)\nfrom astroid.manager import AstroidManager\nfrom astroid.nodes.const import OP_PRECEDENCE\nfrom astroid.nodes.node_ng import NodeNG\n\nif sys.version_info >= (3, 8):\n    from typing import Literal\nelse:\n    from typing_extensions import Literal\n\nif TYPE_CHECKING:\n    from astroid import nodes\n    from astroid.nodes import LocalsDictNodeNG\n\nif sys.version_info >= (3, 8):\n    from functools import cached_property\nelse:\n    from astroid.decorators import cachedproperty as cached_property\n\n\ndef _is_const(value):\n    return isinstance(value, tuple(CONST_CLS))\n\n\n_NodesT = TypeVar(\"_NodesT\", bound=NodeNG)\n\nAssignedStmtsPossibleNode = Union[\"List\", \"Tuple\", \"AssignName\", \"AssignAttr\", None]\nAssignedStmtsCall = Callable[\n    [\n        _NodesT,\n        AssignedStmtsPossibleNode,\n        Optional[InferenceContext],\n        Optional[typing.List[int]],\n    ],\n    Any,\n]\n\n\n@decorators.raise_if_nothing_inferred\ndef unpack_infer(stmt, context=None):\n    \"\"\"recursively generate nodes inferred by the given statement.\n    If the inferred value is a list or a tuple, recurse on the elements\n    \"\"\"\n    if isinstance(stmt, (List, Tuple)):\n        for elt in stmt.elts:\n            if elt is util.Uninferable:\n                yield elt\n                continue\n            yield from unpack_infer(elt, context)\n        return dict(node=stmt, context=context)\n    # if inferred is a final node, return it and stop\n    inferred = next(stmt.infer(context), util.Uninferable)\n    if inferred is stmt:\n        yield inferred\n        return dict(node=stmt, context=context)\n    # else, infer recursively, except Uninferable object that should be returned as is\n    for inferred in stmt.infer(context):\n        if inferred is util.Uninferable:\n            yield inferred\n        else:\n            yield from unpack_infer(inferred, context)\n\n    return dict(node=stmt, context=context)\n\n\ndef are_exclusive(stmt1, stmt2, exceptions: list[str] | None = None) -> bool:\n    \"\"\"return true if the two given statements are mutually exclusive\n\n    `exceptions` may be a list of exception names. If specified, discard If\n    branches and check one of the statement is in an exception handler catching\n    one of the given exceptions.\n\n    algorithm :\n     1) index stmt1's parents\n     2) climb among stmt2's parents until we find a common parent\n     3) if the common parent is a If or TryExcept statement, look if nodes are\n        in exclusive branches\n    \"\"\"\n    # index stmt1's parents\n    stmt1_parents = {}\n    children = {}\n    previous = stmt1\n    for node in stmt1.node_ancestors():\n        stmt1_parents[node] = 1\n        children[node] = previous\n        previous = node\n    # climb among stmt2's parents until we find a common parent\n    previous = stmt2\n    for node in stmt2.node_ancestors():\n        if node in stmt1_parents:\n            # if the common parent is a If or TryExcept statement, look if\n            # nodes are in exclusive branches\n            if isinstance(node, If) and exceptions is None:\n                if (\n                    node.locate_child(previous)[1]\n                    is not node.locate_child(children[node])[1]\n                ):\n                    return True\n            elif isinstance(node, TryExcept):\n                c2attr, c2node = node.locate_child(previous)\n                c1attr, c1node = node.locate_child(children[node])\n                if c1node is not c2node:\n                    first_in_body_caught_by_handlers = (\n                        c2attr == \"handlers\"\n                        and c1attr == \"body\"\n                        and previous.catch(exceptions)\n                    )\n                    second_in_body_caught_by_handlers = (\n                        c2attr == \"body\"\n                        and c1attr == \"handlers\"\n                        and children[node].catch(exceptions)\n                    )\n                    first_in_else_other_in_handlers = (\n                        c2attr == \"handlers\" and c1attr == \"orelse\"\n                    )\n                    second_in_else_other_in_handlers = (\n                        c2attr == \"orelse\" and c1attr == \"handlers\"\n                    )\n                    if any(\n                        (\n                            first_in_body_caught_by_handlers,\n                            second_in_body_caught_by_handlers,\n                            first_in_else_other_in_handlers,\n                            second_in_else_other_in_handlers,\n                        )\n                    ):\n                        return True\n                elif c2attr == \"handlers\" and c1attr == \"handlers\":\n                    return previous is not children[node]\n            return False\n        previous = node\n    return False\n\n\n# getitem() helpers.\n\n_SLICE_SENTINEL = object()\n\n\ndef _slice_value(index, context=None):\n    \"\"\"Get the value of the given slice index.\"\"\"\n\n    if isinstance(index, Const):\n        if isinstance(index.value, (int, type(None))):\n            return index.value\n    elif index is None:\n        return None\n    else:\n        # Try to infer what the index actually is.\n        # Since we can't return all the possible values,\n        # we'll stop at the first possible value.\n        try:\n            inferred = next(index.infer(context=context))\n        except (InferenceError, StopIteration):\n            pass\n        else:\n            if isinstance(inferred, Const):\n                if isinstance(inferred.value, (int, type(None))):\n                    return inferred.value\n\n    # Use a sentinel, because None can be a valid\n    # value that this function can return,\n    # as it is the case for unspecified bounds.\n    return _SLICE_SENTINEL\n\n\ndef _infer_slice(node, context=None):\n    lower = _slice_value(node.lower, context)\n    upper = _slice_value(node.upper, context)\n    step = _slice_value(node.step, context)\n    if all(elem is not _SLICE_SENTINEL for elem in (lower, upper, step)):\n        return slice(lower, upper, step)\n\n    raise AstroidTypeError(\n        message=\"Could not infer slice used in subscript\",\n        node=node,\n        index=node.parent,\n        context=context,\n    )\n\n\ndef _container_getitem(instance, elts, index, context=None):\n    \"\"\"Get a slice or an item, using the given *index*, for the given sequence.\"\"\"\n    try:\n        if isinstance(index, Slice):\n            index_slice = _infer_slice(index, context=context)\n            new_cls = instance.__class__()\n            new_cls.elts = elts[index_slice]\n            new_cls.parent = instance.parent\n            return new_cls\n        if isinstance(index, Const):\n            return elts[index.value]\n    except IndexError as exc:\n        raise AstroidIndexError(\n            message=\"Index {index!s} out of range\",\n            node=instance,\n            index=index,\n            context=context,\n        ) from exc\n    except TypeError as exc:\n        raise AstroidTypeError(\n            message=\"Type error {error!r}\", node=instance, index=index, context=context\n        ) from exc\n\n    raise AstroidTypeError(f\"Could not use {index} as subscript index\")\n\n\nclass Statement(NodeNG):\n    \"\"\"Statement node adding a few attributes\"\"\"\n\n    is_statement = True\n    \"\"\"Whether this node indicates a statement.\"\"\"\n\n    def next_sibling(self):\n        \"\"\"The next sibling statement node.\n\n        :returns: The next sibling statement node.\n        :rtype: NodeNG or None\n        \"\"\"\n        stmts = self.parent.child_sequence(self)\n        index = stmts.index(self)\n        try:\n            return stmts[index + 1]\n        except IndexError:\n            return None\n\n    def previous_sibling(self):\n        \"\"\"The previous sibling statement.\n\n        :returns: The previous sibling statement node.\n        :rtype: NodeNG or None\n        \"\"\"\n        stmts = self.parent.child_sequence(self)\n        index = stmts.index(self)\n        if index >= 1:\n            return stmts[index - 1]\n        return None\n\n\nclass BaseContainer(\n    mixins.ParentAssignTypeMixin, NodeNG, Instance, metaclass=abc.ABCMeta\n):\n    \"\"\"Base class for Set, FrozenSet, Tuple and List.\"\"\"\n\n    _astroid_fields = (\"elts\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.elts: list[NodeNG] = []\n        \"\"\"The elements in the node.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, elts: list[NodeNG]) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param elts: The list of elements the that node contains.\n        \"\"\"\n        self.elts = elts\n\n    @classmethod\n    def from_elements(cls, elts=None):\n        \"\"\"Create a node of this type from the given list of elements.\n\n        :param elts: The list of elements that the node should contain.\n        :type elts: list(NodeNG)\n\n        :returns: A new node containing the given elements.\n        :rtype: NodeNG\n        \"\"\"\n        node = cls()\n        if elts is None:\n            node.elts = []\n        else:\n            node.elts = [const_factory(e) if _is_const(e) else e for e in elts]\n        return node\n\n    def itered(self):\n        \"\"\"An iterator over the elements this node contains.\n\n        :returns: The contents of this node.\n        :rtype: iterable(NodeNG)\n        \"\"\"\n        return self.elts\n\n    def bool_value(self, context=None):\n        \"\"\"Determine the boolean value of this node.\n\n        :returns: The boolean value of this node.\n        :rtype: bool or Uninferable\n        \"\"\"\n        return bool(self.elts)\n\n    @abc.abstractmethod\n    def pytype(self):\n        \"\"\"Get the name of the type that this node represents.\n\n        :returns: The name of the type.\n        :rtype: str\n        \"\"\"\n\n    def get_children(self):\n        yield from self.elts\n\n\nclass LookupMixIn:\n    \"\"\"Mixin to look up a name in the right scope.\"\"\"\n\n    @lru_cache()  # noqa\n    def lookup(self, name: str) -> tuple[str, list[NodeNG]]:\n        \"\"\"Lookup where the given variable is assigned.\n\n        The lookup starts from self's scope. If self is not a frame itself\n        and the name is found in the inner frame locals, statements will be\n        filtered to remove ignorable statements according to self's location.\n\n        :param name: The name of the variable to find assignments for.\n\n        :returns: The scope node and the list of assignments associated to the\n            given name according to the scope where it has been found (locals,\n            globals or builtin).\n        \"\"\"\n        return self.scope().scope_lookup(self, name)\n\n    def ilookup(self, name):\n        \"\"\"Lookup the inferred values of the given variable.\n\n        :param name: The variable name to find values for.\n        :type name: str\n\n        :returns: The inferred values of the statements returned from\n            :meth:`lookup`.\n        :rtype: iterable\n        \"\"\"\n        frame, stmts = self.lookup(name)\n        context = InferenceContext()\n        return _infer_stmts(stmts, context, frame)\n\n\n# Name classes\n\n\nclass AssignName(\n    mixins.NoChildrenMixin, LookupMixIn, mixins.ParentAssignTypeMixin, NodeNG\n):\n    \"\"\"Variation of :class:`ast.Assign` representing assignment to a name.\n\n    An :class:`AssignName` is the name of something that is assigned to.\n    This includes variables defined in a function signature or in a loop.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('variable = range(10)')\n    >>> node\n    <Assign l.1 at 0x7effe1db8550>\n    >>> list(node.get_children())\n    [<AssignName.variable l.1 at 0x7effe1db8748>, <Call l.1 at 0x7effe1db8630>]\n    >>> list(node.get_children())[0].as_string()\n    'variable'\n    \"\"\"\n\n    _other_fields = (\"name\",)\n\n    @decorators.deprecate_default_argument_values(name=\"str\")\n    def __init__(\n        self,\n        name: str | None = None,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param name: The name that is assigned to.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.name: str | None = name\n        \"\"\"The name that is assigned to.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    assigned_stmts: ClassVar[AssignedStmtsCall[AssignName]]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n\nclass DelName(\n    mixins.NoChildrenMixin, LookupMixIn, mixins.ParentAssignTypeMixin, NodeNG\n):\n    \"\"\"Variation of :class:`ast.Delete` representing deletion of a name.\n\n    A :class:`DelName` is the name of something that is deleted.\n\n    >>> import astroid\n    >>> node = astroid.extract_node(\"del variable #@\")\n    >>> list(node.get_children())\n    [<DelName.variable l.1 at 0x7effe1da4d30>]\n    >>> list(node.get_children())[0].as_string()\n    'variable'\n    \"\"\"\n\n    _other_fields = (\"name\",)\n\n    @decorators.deprecate_default_argument_values(name=\"str\")\n    def __init__(\n        self,\n        name: str | None = None,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param name: The name that is being deleted.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.name: str | None = name\n        \"\"\"The name that is being deleted.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n\nclass Name(mixins.NoChildrenMixin, LookupMixIn, NodeNG):\n    \"\"\"Class representing an :class:`ast.Name` node.\n\n    A :class:`Name` node is something that is named, but not covered by\n    :class:`AssignName` or :class:`DelName`.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('range(10)')\n    >>> node\n    <Call l.1 at 0x7effe1db8710>\n    >>> list(node.get_children())\n    [<Name.range l.1 at 0x7effe1db86a0>, <Const.int l.1 at 0x7effe1db8518>]\n    >>> list(node.get_children())[0].as_string()\n    'range'\n    \"\"\"\n\n    _other_fields = (\"name\",)\n\n    @decorators.deprecate_default_argument_values(name=\"str\")\n    def __init__(\n        self,\n        name: str | None = None,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param name: The name that this node refers to.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.name: str | None = name\n        \"\"\"The name that this node refers to.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def _get_name_nodes(self):\n        yield self\n\n        for child_node in self.get_children():\n            yield from child_node._get_name_nodes()\n\n\nclass Arguments(mixins.AssignTypeMixin, NodeNG):\n    \"\"\"Class representing an :class:`ast.arguments` node.\n\n    An :class:`Arguments` node represents that arguments in a\n    function definition.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('def foo(bar): pass')\n    >>> node\n    <FunctionDef.foo l.1 at 0x7effe1db8198>\n    >>> node.args\n    <Arguments l.1 at 0x7effe1db82e8>\n    \"\"\"\n\n    # Python 3.4+ uses a different approach regarding annotations,\n    # each argument is a new class, _ast.arg, which exposes an\n    # 'annotation' attribute. In astroid though, arguments are exposed\n    # as is in the Arguments node and the only way to expose annotations\n    # is by using something similar with Python 3.3:\n    #  - we expose 'varargannotation' and 'kwargannotation' of annotations\n    #    of varargs and kwargs.\n    #  - we expose 'annotation', a list with annotations for\n    #    for each normal argument. If an argument doesn't have an\n    #    annotation, its value will be None.\n    _astroid_fields = (\n        \"args\",\n        \"defaults\",\n        \"kwonlyargs\",\n        \"posonlyargs\",\n        \"posonlyargs_annotations\",\n        \"kw_defaults\",\n        \"annotations\",\n        \"varargannotation\",\n        \"kwargannotation\",\n        \"kwonlyargs_annotations\",\n        \"type_comment_args\",\n        \"type_comment_kwonlyargs\",\n        \"type_comment_posonlyargs\",\n    )\n\n    _other_fields = (\"vararg\", \"kwarg\")\n\n    lineno: None\n    col_offset: None\n    end_lineno: None\n    end_col_offset: None\n\n    def __init__(\n        self,\n        vararg: str | None = None,\n        kwarg: str | None = None,\n        parent: NodeNG | None = None,\n    ) -> None:\n        \"\"\"\n        :param vararg: The name of the variable length arguments.\n\n        :param kwarg: The name of the variable length keyword arguments.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        super().__init__(parent=parent)\n\n        self.vararg: str | None = vararg  # can be None\n        \"\"\"The name of the variable length arguments.\"\"\"\n\n        self.kwarg: str | None = kwarg  # can be None\n        \"\"\"The name of the variable length keyword arguments.\"\"\"\n\n        self.args: list[AssignName] | None\n        \"\"\"The names of the required arguments.\n\n        Can be None if the associated function does not have a retrievable\n        signature and the arguments are therefore unknown.\n        This can happen with (builtin) functions implemented in C that have\n        incomplete signature information.\n        \"\"\"\n        # TODO: Check if other attributes should also be None when\n        # .args is None.\n\n        self.defaults: list[NodeNG]\n        \"\"\"The default values for arguments that can be passed positionally.\"\"\"\n\n        self.kwonlyargs: list[AssignName]\n        \"\"\"The keyword arguments that cannot be passed positionally.\"\"\"\n\n        self.posonlyargs: list[AssignName] = []\n        \"\"\"The arguments that can only be passed positionally.\"\"\"\n\n        self.kw_defaults: list[NodeNG | None]\n        \"\"\"The default values for keyword arguments that cannot be passed positionally.\"\"\"\n\n        self.annotations: list[NodeNG | None]\n        \"\"\"The type annotations of arguments that can be passed positionally.\"\"\"\n\n        self.posonlyargs_annotations: list[NodeNG | None] = []\n        \"\"\"The type annotations of arguments that can only be passed positionally.\"\"\"\n\n        self.kwonlyargs_annotations: list[NodeNG | None] = []\n        \"\"\"The type annotations of arguments that cannot be passed positionally.\"\"\"\n\n        self.type_comment_args: list[NodeNG | None] = []\n        \"\"\"The type annotation, passed by a type comment, of each argument.\n\n        If an argument does not have a type comment,\n        the value for that argument will be None.\n        \"\"\"\n\n        self.type_comment_kwonlyargs: list[NodeNG | None] = []\n        \"\"\"The type annotation, passed by a type comment, of each keyword only argument.\n\n        If an argument does not have a type comment,\n        the value for that argument will be None.\n        \"\"\"\n\n        self.type_comment_posonlyargs: list[NodeNG | None] = []\n        \"\"\"The type annotation, passed by a type comment, of each positional argument.\n\n        If an argument does not have a type comment,\n        the value for that argument will be None.\n        \"\"\"\n\n        self.varargannotation: NodeNG | None = None  # can be None\n        \"\"\"The type annotation for the variable length arguments.\"\"\"\n\n        self.kwargannotation: NodeNG | None = None  # can be None\n        \"\"\"The type annotation for the variable length keyword arguments.\"\"\"\n\n    # pylint: disable=too-many-arguments\n    def postinit(\n        self,\n        args: list[AssignName] | None,\n        defaults: list[NodeNG],\n        kwonlyargs: list[AssignName],\n        kw_defaults: list[NodeNG | None],\n        annotations: list[NodeNG | None],\n        posonlyargs: list[AssignName] | None = None,\n        kwonlyargs_annotations: list[NodeNG | None] | None = None,\n        posonlyargs_annotations: list[NodeNG | None] | None = None,\n        varargannotation: NodeNG | None = None,\n        kwargannotation: NodeNG | None = None,\n        type_comment_args: list[NodeNG | None] | None = None,\n        type_comment_kwonlyargs: list[NodeNG | None] | None = None,\n        type_comment_posonlyargs: list[NodeNG | None] | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param args: The names of the required arguments.\n\n        :param defaults: The default values for arguments that can be passed\n            positionally.\n\n        :param kwonlyargs: The keyword arguments that cannot be passed\n            positionally.\n\n        :param posonlyargs: The arguments that can only be passed\n            positionally.\n\n        :param kw_defaults: The default values for keyword arguments that\n            cannot be passed positionally.\n\n        :param annotations: The type annotations of arguments that can be\n            passed positionally.\n\n        :param kwonlyargs_annotations: The type annotations of arguments that\n            cannot be passed positionally. This should always be passed in\n            Python 3.\n\n        :param posonlyargs_annotations: The type annotations of arguments that\n            can only be passed positionally. This should always be passed in\n            Python 3.\n\n        :param varargannotation: The type annotation for the variable length\n            arguments.\n\n        :param kwargannotation: The type annotation for the variable length\n            keyword arguments.\n\n        :param type_comment_args: The type annotation,\n            passed by a type comment, of each argument.\n\n        :param type_comment_args: The type annotation,\n            passed by a type comment, of each keyword only argument.\n\n        :param type_comment_args: The type annotation,\n            passed by a type comment, of each positional argument.\n        \"\"\"\n        self.args = args\n        self.defaults = defaults\n        self.kwonlyargs = kwonlyargs\n        if posonlyargs is not None:\n            self.posonlyargs = posonlyargs\n        self.kw_defaults = kw_defaults\n        self.annotations = annotations\n        if kwonlyargs_annotations is not None:\n            self.kwonlyargs_annotations = kwonlyargs_annotations\n        if posonlyargs_annotations is not None:\n            self.posonlyargs_annotations = posonlyargs_annotations\n        self.varargannotation = varargannotation\n        self.kwargannotation = kwargannotation\n        if type_comment_args is not None:\n            self.type_comment_args = type_comment_args\n        if type_comment_kwonlyargs is not None:\n            self.type_comment_kwonlyargs = type_comment_kwonlyargs\n        if type_comment_posonlyargs is not None:\n            self.type_comment_posonlyargs = type_comment_posonlyargs\n\n    assigned_stmts: ClassVar[AssignedStmtsCall[Arguments]]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n    def _infer_name(self, frame, name):\n        if self.parent is frame:\n            return name\n        return None\n\n    @cached_property\n    def fromlineno(self):\n        \"\"\"The first line that this node appears on in the source code.\n\n        :type: int or None\n        \"\"\"\n        lineno = super().fromlineno\n        return max(lineno, self.parent.fromlineno or 0)\n\n    @cached_property\n    def arguments(self):\n        \"\"\"Get all the arguments for this node, including positional only and positional and keyword\"\"\"\n        return list(itertools.chain((self.posonlyargs or ()), self.args or ()))\n\n    def format_args(self):\n        \"\"\"Get the arguments formatted as string.\n\n        :returns: The formatted arguments.\n        :rtype: str\n        \"\"\"\n        result = []\n        positional_only_defaults = []\n        positional_or_keyword_defaults = self.defaults\n        if self.defaults:\n            args = self.args or []\n            positional_or_keyword_defaults = self.defaults[-len(args) :]\n            positional_only_defaults = self.defaults[: len(self.defaults) - len(args)]\n\n        if self.posonlyargs:\n            result.append(\n                _format_args(\n                    self.posonlyargs,\n                    positional_only_defaults,\n                    self.posonlyargs_annotations,\n                )\n            )\n            result.append(\"/\")\n        if self.args:\n            result.append(\n                _format_args(\n                    self.args,\n                    positional_or_keyword_defaults,\n                    getattr(self, \"annotations\", None),\n                )\n            )\n        if self.vararg:\n            result.append(f\"*{self.vararg}\")\n        if self.kwonlyargs:\n            if not self.vararg:\n                result.append(\"*\")\n            result.append(\n                _format_args(\n                    self.kwonlyargs, self.kw_defaults, self.kwonlyargs_annotations\n                )\n            )\n        if self.kwarg:\n            result.append(f\"**{self.kwarg}\")\n        return \", \".join(result)\n\n    def default_value(self, argname):\n        \"\"\"Get the default value for an argument.\n\n        :param argname: The name of the argument to get the default value for.\n        :type argname: str\n\n        :raises NoDefault: If there is no default value defined for the\n            given argument.\n        \"\"\"\n        args = self.arguments\n        index = _find_arg(argname, args)[0]\n        if index is not None:\n            idx = index - (len(args) - len(self.defaults))\n            if idx >= 0:\n                return self.defaults[idx]\n        index = _find_arg(argname, self.kwonlyargs)[0]\n        if index is not None and self.kw_defaults[index] is not None:\n            return self.kw_defaults[index]\n        raise NoDefault(func=self.parent, name=argname)\n\n    def is_argument(self, name):\n        \"\"\"Check if the given name is defined in the arguments.\n\n        :param name: The name to check for.\n        :type name: str\n\n        :returns: True if the given name is defined in the arguments,\n            False otherwise.\n        :rtype: bool\n        \"\"\"\n        if name == self.vararg:\n            return True\n        if name == self.kwarg:\n            return True\n        return (\n            self.find_argname(name, rec=True)[1] is not None\n            or self.kwonlyargs\n            and _find_arg(name, self.kwonlyargs, rec=True)[1] is not None\n        )\n\n    def find_argname(self, argname, rec=False):\n        \"\"\"Get the index and :class:`AssignName` node for given name.\n\n        :param argname: The name of the argument to search for.\n        :type argname: str\n\n        :param rec: Whether or not to include arguments in unpacked tuples\n            in the search.\n        :type rec: bool\n\n        :returns: The index and node for the argument.\n        :rtype: tuple(str or None, AssignName or None)\n        \"\"\"\n        if self.arguments:\n            return _find_arg(argname, self.arguments, rec)\n        return None, None\n\n    def get_children(self):\n        yield from self.posonlyargs or ()\n\n        for elt in self.posonlyargs_annotations:\n            if elt is not None:\n                yield elt\n\n        yield from self.args or ()\n\n        yield from self.defaults\n        yield from self.kwonlyargs\n\n        for elt in self.kw_defaults:\n            if elt is not None:\n                yield elt\n\n        for elt in self.annotations:\n            if elt is not None:\n                yield elt\n\n        if self.varargannotation is not None:\n            yield self.varargannotation\n\n        if self.kwargannotation is not None:\n            yield self.kwargannotation\n\n        for elt in self.kwonlyargs_annotations:\n            if elt is not None:\n                yield elt\n\n\ndef _find_arg(argname, args, rec=False):\n    for i, arg in enumerate(args):\n        if isinstance(arg, Tuple):\n            if rec:\n                found = _find_arg(argname, arg.elts)\n                if found[0] is not None:\n                    return found\n        elif arg.name == argname:\n            return i, arg\n    return None, None\n\n\ndef _format_args(args, defaults=None, annotations=None):\n    values = []\n    if args is None:\n        return \"\"\n    if annotations is None:\n        annotations = []\n    if defaults is not None:\n        default_offset = len(args) - len(defaults)\n    packed = itertools.zip_longest(args, annotations)\n    for i, (arg, annotation) in enumerate(packed):\n        if isinstance(arg, Tuple):\n            values.append(f\"({_format_args(arg.elts)})\")\n        else:\n            argname = arg.name\n            default_sep = \"=\"\n            if annotation is not None:\n                argname += \": \" + annotation.as_string()\n                default_sep = \" = \"\n            values.append(argname)\n\n            if defaults is not None and i >= default_offset:\n                if defaults[i - default_offset] is not None:\n                    values[-1] += default_sep + defaults[i - default_offset].as_string()\n    return \", \".join(values)\n\n\nclass AssignAttr(mixins.ParentAssignTypeMixin, NodeNG):\n    \"\"\"Variation of :class:`ast.Assign` representing assignment to an attribute.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('self.attribute = range(10)')\n    >>> node\n    <Assign l.1 at 0x7effe1d521d0>\n    >>> list(node.get_children())\n    [<AssignAttr.attribute l.1 at 0x7effe1d52320>, <Call l.1 at 0x7effe1d522e8>]\n    >>> list(node.get_children())[0].as_string()\n    'self.attribute'\n    \"\"\"\n\n    _astroid_fields = (\"expr\",)\n    _other_fields = (\"attrname\",)\n\n    @decorators.deprecate_default_argument_values(attrname=\"str\")\n    def __init__(\n        self,\n        attrname: str | None = None,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param attrname: The name of the attribute being assigned to.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.expr: NodeNG | None = None\n        \"\"\"What has the attribute that is being assigned to.\"\"\"\n\n        self.attrname: str | None = attrname\n        \"\"\"The name of the attribute being assigned to.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, expr: NodeNG | None = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param expr: What has the attribute that is being assigned to.\n        \"\"\"\n        self.expr = expr\n\n    assigned_stmts: ClassVar[AssignedStmtsCall[AssignAttr]]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n    def get_children(self):\n        yield self.expr\n\n\nclass Assert(Statement):\n    \"\"\"Class representing an :class:`ast.Assert` node.\n\n    An :class:`Assert` node represents an assert statement.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('assert len(things) == 10, \"Not enough things\"')\n    >>> node\n    <Assert l.1 at 0x7effe1d527b8>\n    \"\"\"\n\n    _astroid_fields = (\"test\", \"fail\")\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.test: NodeNG | None = None\n        \"\"\"The test that passes or fails the assertion.\"\"\"\n\n        self.fail: NodeNG | None = None  # can be None\n        \"\"\"The message shown when the assertion fails.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, test: NodeNG | None = None, fail: NodeNG | None = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param test: The test that passes or fails the assertion.\n\n        :param fail: The message shown when the assertion fails.\n        \"\"\"\n        self.fail = fail\n        self.test = test\n\n    def get_children(self):\n        yield self.test\n\n        if self.fail is not None:\n            yield self.fail\n\n\nclass Assign(mixins.AssignTypeMixin, Statement):\n    \"\"\"Class representing an :class:`ast.Assign` node.\n\n    An :class:`Assign` is a statement where something is explicitly\n    asssigned to.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('variable = range(10)')\n    >>> node\n    <Assign l.1 at 0x7effe1db8550>\n    \"\"\"\n\n    _astroid_fields = (\"targets\", \"value\")\n    _other_other_fields = (\"type_annotation\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.targets: list[NodeNG] = []\n        \"\"\"What is being assigned to.\"\"\"\n\n        self.value: NodeNG | None = None\n        \"\"\"The value being assigned to the variables.\"\"\"\n\n        self.type_annotation: NodeNG | None = None  # can be None\n        \"\"\"If present, this will contain the type annotation passed by a type comment\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        targets: list[NodeNG] | None = None,\n        value: NodeNG | None = None,\n        type_annotation: NodeNG | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param targets: What is being assigned to.\n        :param value: The value being assigned to the variables.\n        :param type_annotation:\n        \"\"\"\n        if targets is not None:\n            self.targets = targets\n        self.value = value\n        self.type_annotation = type_annotation\n\n    assigned_stmts: ClassVar[AssignedStmtsCall[Assign]]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n    def get_children(self):\n        yield from self.targets\n\n        yield self.value\n\n    @decorators.cached\n    def _get_assign_nodes(self):\n        return [self] + list(self.value._get_assign_nodes())\n\n    def _get_yield_nodes_skip_lambdas(self):\n        yield from self.value._get_yield_nodes_skip_lambdas()\n\n\nclass AnnAssign(mixins.AssignTypeMixin, Statement):\n    \"\"\"Class representing an :class:`ast.AnnAssign` node.\n\n    An :class:`AnnAssign` is an assignment with a type annotation.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('variable: List[int] = range(10)')\n    >>> node\n    <AnnAssign l.1 at 0x7effe1d4c630>\n    \"\"\"\n\n    _astroid_fields = (\"target\", \"annotation\", \"value\")\n    _other_fields = (\"simple\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.target: NodeNG | None = None\n        \"\"\"What is being assigned to.\"\"\"\n\n        self.annotation: NodeNG | None = None\n        \"\"\"The type annotation of what is being assigned to.\"\"\"\n\n        self.value: NodeNG | None = None  # can be None\n        \"\"\"The value being assigned to the variables.\"\"\"\n\n        self.simple: int | None = None\n        \"\"\"Whether :attr:`target` is a pure name or a complex statement.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        target: NodeNG,\n        annotation: NodeNG,\n        simple: int,\n        value: NodeNG | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param target: What is being assigned to.\n\n        :param annotation: The type annotation of what is being assigned to.\n\n        :param simple: Whether :attr:`target` is a pure name\n            or a complex statement.\n\n        :param value: The value being assigned to the variables.\n        \"\"\"\n        self.target = target\n        self.annotation = annotation\n        self.value = value\n        self.simple = simple\n\n    assigned_stmts: ClassVar[AssignedStmtsCall[AnnAssign]]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n    def get_children(self):\n        yield self.target\n        yield self.annotation\n\n        if self.value is not None:\n            yield self.value\n\n\nclass AugAssign(mixins.AssignTypeMixin, Statement):\n    \"\"\"Class representing an :class:`ast.AugAssign` node.\n\n    An :class:`AugAssign` is an assignment paired with an operator.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('variable += 1')\n    >>> node\n    <AugAssign l.1 at 0x7effe1db4d68>\n    \"\"\"\n\n    _astroid_fields = (\"target\", \"value\")\n    _other_fields = (\"op\",)\n\n    @decorators.deprecate_default_argument_values(op=\"str\")\n    def __init__(\n        self,\n        op: str | None = None,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param op: The operator that is being combined with the assignment.\n            This includes the equals sign.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.target: NodeNG | None = None\n        \"\"\"What is being assigned to.\"\"\"\n\n        self.op: str | None = op\n        \"\"\"The operator that is being combined with the assignment.\n\n        This includes the equals sign.\n        \"\"\"\n\n        self.value: NodeNG | None = None\n        \"\"\"The value being assigned to the variable.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self, target: NodeNG | None = None, value: NodeNG | None = None\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param target: What is being assigned to.\n\n        :param value: The value being assigned to the variable.\n        \"\"\"\n        self.target = target\n        self.value = value\n\n    assigned_stmts: ClassVar[AssignedStmtsCall[AugAssign]]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n    # This is set by inference.py\n    def _infer_augassign(self, context=None):\n        raise NotImplementedError\n\n    def type_errors(self, context=None):\n        \"\"\"Get a list of type errors which can occur during inference.\n\n        Each TypeError is represented by a :class:`BadBinaryOperationMessage` ,\n        which holds the original exception.\n\n        :returns: The list of possible type errors.\n        :rtype: list(BadBinaryOperationMessage)\n        \"\"\"\n        try:\n            results = self._infer_augassign(context=context)\n            return [\n                result\n                for result in results\n                if isinstance(result, util.BadBinaryOperationMessage)\n            ]\n        except InferenceError:\n            return []\n\n    def get_children(self):\n        yield self.target\n        yield self.value\n\n    def _get_yield_nodes_skip_lambdas(self):\n        \"\"\"An AugAssign node can contain a Yield node in the value\"\"\"\n        yield from self.value._get_yield_nodes_skip_lambdas()\n        yield from super()._get_yield_nodes_skip_lambdas()\n\n\nclass BinOp(NodeNG):\n    \"\"\"Class representing an :class:`ast.BinOp` node.\n\n    A :class:`BinOp` node is an application of a binary operator.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('a + b')\n    >>> node\n    <BinOp l.1 at 0x7f23b2e8cfd0>\n    \"\"\"\n\n    _astroid_fields = (\"left\", \"right\")\n    _other_fields = (\"op\",)\n\n    @decorators.deprecate_default_argument_values(op=\"str\")\n    def __init__(\n        self,\n        op: str | None = None,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param op: The operator.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.left: NodeNG | None = None\n        \"\"\"What is being applied to the operator on the left side.\"\"\"\n\n        self.op: str | None = op\n        \"\"\"The operator.\"\"\"\n\n        self.right: NodeNG | None = None\n        \"\"\"What is being applied to the operator on the right side.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, left: NodeNG | None = None, right: NodeNG | None = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param left: What is being applied to the operator on the left side.\n\n        :param right: What is being applied to the operator on the right side.\n        \"\"\"\n        self.left = left\n        self.right = right\n\n    # This is set by inference.py\n    def _infer_binop(self, context=None):\n        raise NotImplementedError\n\n    def type_errors(self, context=None):\n        \"\"\"Get a list of type errors which can occur during inference.\n\n        Each TypeError is represented by a :class:`BadBinaryOperationMessage`,\n        which holds the original exception.\n\n        :returns: The list of possible type errors.\n        :rtype: list(BadBinaryOperationMessage)\n        \"\"\"\n        try:\n            results = self._infer_binop(context=context)\n            return [\n                result\n                for result in results\n                if isinstance(result, util.BadBinaryOperationMessage)\n            ]\n        except InferenceError:\n            return []\n\n    def get_children(self):\n        yield self.left\n        yield self.right\n\n    def op_precedence(self):\n        return OP_PRECEDENCE[self.op]\n\n    def op_left_associative(self):\n        # 2**3**4 == 2**(3**4)\n        return self.op != \"**\"\n\n\nclass BoolOp(NodeNG):\n    \"\"\"Class representing an :class:`ast.BoolOp` node.\n\n    A :class:`BoolOp` is an application of a boolean operator.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('a and b')\n    >>> node\n    <BinOp l.1 at 0x7f23b2e71c50>\n    \"\"\"\n\n    _astroid_fields = (\"values\",)\n    _other_fields = (\"op\",)\n\n    @decorators.deprecate_default_argument_values(op=\"str\")\n    def __init__(\n        self,\n        op: str | None = None,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param op: The operator.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.op: str | None = op\n        \"\"\"The operator.\"\"\"\n\n        self.values: list[NodeNG] = []\n        \"\"\"The values being applied to the operator.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, values: list[NodeNG] | None = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param values: The values being applied to the operator.\n        \"\"\"\n        if values is not None:\n            self.values = values\n\n    def get_children(self):\n        yield from self.values\n\n    def op_precedence(self):\n        return OP_PRECEDENCE[self.op]\n\n\nclass Break(mixins.NoChildrenMixin, Statement):\n    \"\"\"Class representing an :class:`ast.Break` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('break')\n    >>> node\n    <Break l.1 at 0x7f23b2e9e5c0>\n    \"\"\"\n\n\nclass Call(NodeNG):\n    \"\"\"Class representing an :class:`ast.Call` node.\n\n    A :class:`Call` node is a call to a function, method, etc.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('function()')\n    >>> node\n    <Call l.1 at 0x7f23b2e71eb8>\n    \"\"\"\n\n    _astroid_fields = (\"func\", \"args\", \"keywords\")\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.func: NodeNG | None = None\n        \"\"\"What is being called.\"\"\"\n\n        self.args: list[NodeNG] = []\n        \"\"\"The positional arguments being given to the call.\"\"\"\n\n        self.keywords: list[Keyword] = []\n        \"\"\"The keyword arguments being given to the call.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        func: NodeNG | None = None,\n        args: list[NodeNG] | None = None,\n        keywords: list[Keyword] | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param func: What is being called.\n\n        :param args: The positional arguments being given to the call.\n\n        :param keywords: The keyword arguments being given to the call.\n        \"\"\"\n        self.func = func\n        if args is not None:\n            self.args = args\n        if keywords is not None:\n            self.keywords = keywords\n\n    @property\n    def starargs(self) -> list[Starred]:\n        \"\"\"The positional arguments that unpack something.\"\"\"\n        return [arg for arg in self.args if isinstance(arg, Starred)]\n\n    @property\n    def kwargs(self) -> list[Keyword]:\n        \"\"\"The keyword arguments that unpack something.\"\"\"\n        return [keyword for keyword in self.keywords if keyword.arg is None]\n\n    def get_children(self):\n        yield self.func\n\n        yield from self.args\n\n        yield from self.keywords\n\n\nclass Compare(NodeNG):\n    \"\"\"Class representing an :class:`ast.Compare` node.\n\n    A :class:`Compare` node indicates a comparison.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('a <= b <= c')\n    >>> node\n    <Compare l.1 at 0x7f23b2e9e6d8>\n    >>> node.ops\n    [('<=', <Name.b l.1 at 0x7f23b2e9e2b0>), ('<=', <Name.c l.1 at 0x7f23b2e9e390>)]\n    \"\"\"\n\n    _astroid_fields = (\"left\", \"ops\")\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.left: NodeNG | None = None\n        \"\"\"The value at the left being applied to a comparison operator.\"\"\"\n\n        self.ops: list[tuple[str, NodeNG]] = []\n        \"\"\"The remainder of the operators and their relevant right hand value.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        left: NodeNG | None = None,\n        ops: list[tuple[str, NodeNG]] | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param left: The value at the left being applied to a comparison\n            operator.\n\n        :param ops: The remainder of the operators\n            and their relevant right hand value.\n        \"\"\"\n        self.left = left\n        if ops is not None:\n            self.ops = ops\n\n    def get_children(self):\n        \"\"\"Get the child nodes below this node.\n\n        Overridden to handle the tuple fields and skip returning the operator\n        strings.\n\n        :returns: The children.\n        :rtype: iterable(NodeNG)\n        \"\"\"\n        yield self.left\n        for _, comparator in self.ops:\n            yield comparator  # we don't want the 'op'\n\n    def last_child(self):\n        \"\"\"An optimized version of list(get_children())[-1]\n\n        :returns: The last child.\n        :rtype: NodeNG\n        \"\"\"\n        # XXX maybe if self.ops:\n        return self.ops[-1][1]\n        # return self.left\n\n\nclass Comprehension(NodeNG):\n    \"\"\"Class representing an :class:`ast.comprehension` node.\n\n    A :class:`Comprehension` indicates the loop inside any type of\n    comprehension including generator expressions.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('[x for x in some_values]')\n    >>> list(node.get_children())\n    [<Name.x l.1 at 0x7f23b2e352b0>, <Comprehension l.1 at 0x7f23b2e35320>]\n    >>> list(node.get_children())[1].as_string()\n    'for x in some_values'\n    \"\"\"\n\n    _astroid_fields = (\"target\", \"iter\", \"ifs\")\n    _other_fields = (\"is_async\",)\n\n    optional_assign = True\n    \"\"\"Whether this node optionally assigns a variable.\"\"\"\n\n    lineno: None\n    col_offset: None\n    end_lineno: None\n    end_col_offset: None\n\n    def __init__(self, parent: NodeNG | None = None) -> None:\n        \"\"\"\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.target: NodeNG | None = None\n        \"\"\"What is assigned to by the comprehension.\"\"\"\n\n        self.iter: NodeNG | None = None\n        \"\"\"What is iterated over by the comprehension.\"\"\"\n\n        self.ifs: list[NodeNG] = []\n        \"\"\"The contents of any if statements that filter the comprehension.\"\"\"\n\n        self.is_async: bool | None = None\n        \"\"\"Whether this is an asynchronous comprehension or not.\"\"\"\n\n        super().__init__(parent=parent)\n\n    # pylint: disable=redefined-builtin; same name as builtin ast module.\n    def postinit(\n        self,\n        target: NodeNG | None = None,\n        iter: NodeNG | None = None,\n        ifs: list[NodeNG] | None = None,\n        is_async: bool | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param target: What is assigned to by the comprehension.\n\n        :param iter: What is iterated over by the comprehension.\n\n        :param ifs: The contents of any if statements that filter\n            the comprehension.\n\n        :param is_async: Whether this is an asynchronous comprehension or not.\n        \"\"\"\n        self.target = target\n        self.iter = iter\n        if ifs is not None:\n            self.ifs = ifs\n        self.is_async = is_async\n\n    assigned_stmts: ClassVar[AssignedStmtsCall[Comprehension]]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n    def assign_type(self):\n        \"\"\"The type of assignment that this node performs.\n\n        :returns: The assignment type.\n        :rtype: NodeNG\n        \"\"\"\n        return self\n\n    def _get_filtered_stmts(self, lookup_node, node, stmts, mystmt: Statement | None):\n        \"\"\"method used in filter_stmts\"\"\"\n        if self is mystmt:\n            if isinstance(lookup_node, (Const, Name)):\n                return [lookup_node], True\n\n        elif self.statement(future=True) is mystmt:\n            # original node's statement is the assignment, only keeps\n            # current node (gen exp, list comp)\n\n            return [node], True\n\n        return stmts, False\n\n    def get_children(self):\n        yield self.target\n        yield self.iter\n\n        yield from self.ifs\n\n\nclass Const(mixins.NoChildrenMixin, NodeNG, Instance):\n    \"\"\"Class representing any constant including num, str, bool, None, bytes.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('(5, \"This is a string.\", True, None, b\"bytes\")')\n    >>> node\n    <Tuple.tuple l.1 at 0x7f23b2e358d0>\n    >>> list(node.get_children())\n    [<Const.int l.1 at 0x7f23b2e35940>,\n    <Const.str l.1 at 0x7f23b2e35978>,\n    <Const.bool l.1 at 0x7f23b2e359b0>,\n    <Const.NoneType l.1 at 0x7f23b2e359e8>,\n    <Const.bytes l.1 at 0x7f23b2e35a20>]\n    \"\"\"\n\n    _other_fields = (\"value\", \"kind\")\n\n    def __init__(\n        self,\n        value: Any,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        kind: str | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param value: The value that the constant represents.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param kind: The string prefix. \"u\" for u-prefixed strings and ``None`` otherwise. Python 3.8+ only.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.value: Any = value\n        \"\"\"The value that the constant represents.\"\"\"\n\n        self.kind: str | None = kind  # can be None\n        \"\"\"\"The string prefix. \"u\" for u-prefixed strings and ``None`` otherwise. Python 3.8+ only.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def __getattr__(self, name):\n        # This is needed because of Proxy's __getattr__ method.\n        # Calling object.__new__ on this class without calling\n        # __init__ would result in an infinite loop otherwise\n        # since __getattr__ is called when an attribute doesn't\n        # exist and self._proxied indirectly calls self.value\n        # and Proxy __getattr__ calls self.value\n        if name == \"value\":\n            raise AttributeError\n        return super().__getattr__(name)\n\n    def getitem(self, index, context=None):\n        \"\"\"Get an item from this node if subscriptable.\n\n        :param index: The node to use as a subscript index.\n        :type index: Const or Slice\n\n        :raises AstroidTypeError: When the given index cannot be used as a\n            subscript index, or if this node is not subscriptable.\n        \"\"\"\n        if isinstance(index, Const):\n            index_value = index.value\n        elif isinstance(index, Slice):\n            index_value = _infer_slice(index, context=context)\n\n        else:\n            raise AstroidTypeError(\n                f\"Could not use type {type(index)} as subscript index\"\n            )\n\n        try:\n            if isinstance(self.value, (str, bytes)):\n                return Const(self.value[index_value])\n        except IndexError as exc:\n            raise AstroidIndexError(\n                message=\"Index {index!r} out of range\",\n                node=self,\n                index=index,\n                context=context,\n            ) from exc\n        except TypeError as exc:\n            raise AstroidTypeError(\n                message=\"Type error {error!r}\", node=self, index=index, context=context\n            ) from exc\n\n        raise AstroidTypeError(f\"{self!r} (value={self.value})\")\n\n    def has_dynamic_getattr(self):\n        \"\"\"Check if the node has a custom __getattr__ or __getattribute__.\n\n        :returns: True if the class has a custom\n            __getattr__ or __getattribute__, False otherwise.\n            For a :class:`Const` this is always ``False``.\n        :rtype: bool\n        \"\"\"\n        return False\n\n    def itered(self):\n        \"\"\"An iterator over the elements this node contains.\n\n        :returns: The contents of this node.\n        :rtype: iterable(Const)\n\n        :raises TypeError: If this node does not represent something that is iterable.\n        \"\"\"\n        if isinstance(self.value, str):\n            return [const_factory(elem) for elem in self.value]\n        raise TypeError(f\"Cannot iterate over type {type(self.value)!r}\")\n\n    def pytype(self):\n        \"\"\"Get the name of the type that this node represents.\n\n        :returns: The name of the type.\n        :rtype: str\n        \"\"\"\n        return self._proxied.qname()\n\n    def bool_value(self, context=None):\n        \"\"\"Determine the boolean value of this node.\n\n        :returns: The boolean value of this node.\n        :rtype: bool\n        \"\"\"\n        return bool(self.value)\n\n\nclass Continue(mixins.NoChildrenMixin, Statement):\n    \"\"\"Class representing an :class:`ast.Continue` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('continue')\n    >>> node\n    <Continue l.1 at 0x7f23b2e35588>\n    \"\"\"\n\n\nclass Decorators(NodeNG):\n    \"\"\"A node representing a list of decorators.\n\n    A :class:`Decorators` is the decorators that are applied to\n    a method or function.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    @property\n    def my_property(self):\n        return 3\n    ''')\n    >>> node\n    <FunctionDef.my_property l.2 at 0x7f23b2e35d30>\n    >>> list(node.get_children())[0]\n    <Decorators l.1 at 0x7f23b2e35d68>\n    \"\"\"\n\n    _astroid_fields = (\"nodes\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.nodes: list[NodeNG]\n        \"\"\"The decorators that this node contains.\n\n        :type: list(Name or Call) or None\n        \"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, nodes: list[NodeNG]) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param nodes: The decorators that this node contains.\n        :type nodes: list(Name or Call)\n        \"\"\"\n        self.nodes = nodes\n\n    def scope(self) -> LocalsDictNodeNG:\n        \"\"\"The first parent node defining a new scope.\n        These can be Module, FunctionDef, ClassDef, Lambda, or GeneratorExp nodes.\n\n        :returns: The first parent scope node.\n        \"\"\"\n        # skip the function node to go directly to the upper level scope\n        if not self.parent:\n            raise ParentMissingError(target=self)\n        if not self.parent.parent:\n            raise ParentMissingError(target=self.parent)\n        return self.parent.parent.scope()\n\n    def get_children(self):\n        yield from self.nodes\n\n\nclass DelAttr(mixins.ParentAssignTypeMixin, NodeNG):\n    \"\"\"Variation of :class:`ast.Delete` representing deletion of an attribute.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('del self.attr')\n    >>> node\n    <Delete l.1 at 0x7f23b2e35f60>\n    >>> list(node.get_children())[0]\n    <DelAttr.attr l.1 at 0x7f23b2e411d0>\n    \"\"\"\n\n    _astroid_fields = (\"expr\",)\n    _other_fields = (\"attrname\",)\n\n    @decorators.deprecate_default_argument_values(attrname=\"str\")\n    def __init__(\n        self,\n        attrname: str | None = None,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param attrname: The name of the attribute that is being deleted.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.expr: NodeNG | None = None\n        \"\"\"The name that this node represents.\n\n        :type: Name or None\n        \"\"\"\n\n        self.attrname: str | None = attrname\n        \"\"\"The name of the attribute that is being deleted.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, expr: NodeNG | None = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param expr: The name that this node represents.\n        :type expr: Name or None\n        \"\"\"\n        self.expr = expr\n\n    def get_children(self):\n        yield self.expr\n\n\nclass Delete(mixins.AssignTypeMixin, Statement):\n    \"\"\"Class representing an :class:`ast.Delete` node.\n\n    A :class:`Delete` is a ``del`` statement this is deleting something.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('del self.attr')\n    >>> node\n    <Delete l.1 at 0x7f23b2e35f60>\n    \"\"\"\n\n    _astroid_fields = (\"targets\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.targets: list[NodeNG] = []\n        \"\"\"What is being deleted.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, targets: list[NodeNG] | None = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param targets: What is being deleted.\n        \"\"\"\n        if targets is not None:\n            self.targets = targets\n\n    def get_children(self):\n        yield from self.targets\n\n\nclass Dict(NodeNG, Instance):\n    \"\"\"Class representing an :class:`ast.Dict` node.\n\n    A :class:`Dict` is a dictionary that is created with ``{}`` syntax.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('{1: \"1\"}')\n    >>> node\n    <Dict.dict l.1 at 0x7f23b2e35cc0>\n    \"\"\"\n\n    _astroid_fields = (\"items\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.items: list[tuple[NodeNG, NodeNG]] = []\n        \"\"\"The key-value pairs contained in the dictionary.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, items: list[tuple[NodeNG, NodeNG]]) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param items: The key-value pairs contained in the dictionary.\n        \"\"\"\n        self.items = items\n\n    @classmethod\n    def from_elements(cls, items=None):\n        \"\"\"Create a :class:`Dict` of constants from a live dictionary.\n\n        :param items: The items to store in the node.\n        :type items: dict\n\n        :returns: The created dictionary node.\n        :rtype: Dict\n        \"\"\"\n        node = cls()\n        if items is None:\n            node.items = []\n        else:\n            node.items = [\n                (const_factory(k), const_factory(v) if _is_const(v) else v)\n                for k, v in items.items()\n                # The keys need to be constants\n                if _is_const(k)\n            ]\n        return node\n\n    def pytype(self):\n        \"\"\"Get the name of the type that this node represents.\n\n        :returns: The name of the type.\n        :rtype: str\n        \"\"\"\n        return \"builtins.dict\"\n\n    def get_children(self):\n        \"\"\"Get the key and value nodes below this node.\n\n        Children are returned in the order that they are defined in the source\n        code, key first then the value.\n\n        :returns: The children.\n        :rtype: iterable(NodeNG)\n        \"\"\"\n        for key, value in self.items:\n            yield key\n            yield value\n\n    def last_child(self):\n        \"\"\"An optimized version of list(get_children())[-1]\n\n        :returns: The last child, or None if no children exist.\n        :rtype: NodeNG or None\n        \"\"\"\n        if self.items:\n            return self.items[-1][1]\n        return None\n\n    def itered(self):\n        \"\"\"An iterator over the keys this node contains.\n\n        :returns: The keys of this node.\n        :rtype: iterable(NodeNG)\n        \"\"\"\n        return [key for (key, _) in self.items]\n\n    def getitem(self, index, context=None):\n        \"\"\"Get an item from this node.\n\n        :param index: The node to use as a subscript index.\n        :type index: Const or Slice\n\n        :raises AstroidTypeError: When the given index cannot be used as a\n            subscript index, or if this node is not subscriptable.\n        :raises AstroidIndexError: If the given index does not exist in the\n            dictionary.\n        \"\"\"\n        for key, value in self.items:\n            # TODO(cpopa): no support for overriding yet, {1:2, **{1: 3}}.\n            if isinstance(key, DictUnpack):\n                try:\n                    return value.getitem(index, context)\n                except (AstroidTypeError, AstroidIndexError):\n                    continue\n            for inferredkey in key.infer(context):\n                if inferredkey is util.Uninferable:\n                    continue\n                if isinstance(inferredkey, Const) and isinstance(index, Const):\n                    if inferredkey.value == index.value:\n                        return value\n\n        raise AstroidIndexError(index)\n\n    def bool_value(self, context=None):\n        \"\"\"Determine the boolean value of this node.\n\n        :returns: The boolean value of this node.\n        :rtype: bool\n        \"\"\"\n        return bool(self.items)\n\n\nclass Expr(Statement):\n    \"\"\"Class representing an :class:`ast.Expr` node.\n\n    An :class:`Expr` is any expression that does not have its value used or\n    stored.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('method()')\n    >>> node\n    <Call l.1 at 0x7f23b2e352b0>\n    >>> node.parent\n    <Expr l.1 at 0x7f23b2e35278>\n    \"\"\"\n\n    _astroid_fields = (\"value\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.value: NodeNG | None = None\n        \"\"\"What the expression does.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, value: NodeNG | None = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: What the expression does.\n        \"\"\"\n        self.value = value\n\n    def get_children(self):\n        yield self.value\n\n    def _get_yield_nodes_skip_lambdas(self):\n        if not self.value.is_lambda:\n            yield from self.value._get_yield_nodes_skip_lambdas()\n\n\nclass Ellipsis(mixins.NoChildrenMixin, NodeNG):  # pylint: disable=redefined-builtin\n    \"\"\"Class representing an :class:`ast.Ellipsis` node.\n\n    An :class:`Ellipsis` is the ``...`` syntax.\n\n    Deprecated since v2.6.0 - Use :class:`Const` instead.\n    Will be removed with the release v2.7.0\n    \"\"\"\n\n\nclass EmptyNode(mixins.NoChildrenMixin, NodeNG):\n    \"\"\"Holds an arbitrary object in the :attr:`LocalsDictNodeNG.locals`.\"\"\"\n\n    object = None\n\n\nclass ExceptHandler(mixins.MultiLineBlockMixin, mixins.AssignTypeMixin, Statement):\n    \"\"\"Class representing an :class:`ast.ExceptHandler`. node.\n\n    An :class:`ExceptHandler` is an ``except`` block on a try-except.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n        try:\n            do_something()\n        except Exception as error:\n            print(\"Error!\")\n        ''')\n    >>> node\n    <TryExcept l.2 at 0x7f23b2e9d908>\n    >>> node.handlers\n    [<ExceptHandler l.4 at 0x7f23b2e9e860>]\n    \"\"\"\n\n    _astroid_fields = (\"type\", \"name\", \"body\")\n    _multi_line_block_fields = (\"body\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.type: NodeNG | None = None  # can be None\n        \"\"\"The types that the block handles.\n\n        :type: Tuple or NodeNG or None\n        \"\"\"\n\n        self.name: AssignName | None = None  # can be None\n        \"\"\"The name that the caught exception is assigned to.\"\"\"\n\n        self.body: list[NodeNG] = []\n        \"\"\"The contents of the block.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    assigned_stmts: ClassVar[AssignedStmtsCall[ExceptHandler]]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n    def get_children(self):\n        if self.type is not None:\n            yield self.type\n\n        if self.name is not None:\n            yield self.name\n\n        yield from self.body\n\n    # pylint: disable=redefined-builtin; had to use the same name as builtin ast module.\n    def postinit(\n        self,\n        type: NodeNG | None = None,\n        name: AssignName | None = None,\n        body: list[NodeNG] | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param type: The types that the block handles.\n        :type type: Tuple or NodeNG or None\n\n        :param name: The name that the caught exception is assigned to.\n\n        :param body:The contents of the block.\n        \"\"\"\n        self.type = type\n        self.name = name\n        if body is not None:\n            self.body = body\n\n    @cached_property\n    def blockstart_tolineno(self):\n        \"\"\"The line on which the beginning of this block ends.\n\n        :type: int\n        \"\"\"\n        if self.name:\n            return self.name.tolineno\n        if self.type:\n            return self.type.tolineno\n        return self.lineno\n\n    def catch(self, exceptions: list[str] | None) -> bool:\n        \"\"\"Check if this node handles any of the given\n\n        :param exceptions: The names of the exceptions to check for.\n        \"\"\"\n        if self.type is None or exceptions is None:\n            return True\n        return any(node.name in exceptions for node in self.type._get_name_nodes())\n\n\nclass ExtSlice(NodeNG):\n    \"\"\"Class representing an :class:`ast.ExtSlice` node.\n\n    An :class:`ExtSlice` is a complex slice expression.\n\n    Deprecated since v2.6.0 - Now part of the :class:`Subscript` node.\n    Will be removed with the release of v2.7.0\n    \"\"\"\n\n\nclass For(\n    mixins.MultiLineBlockMixin,\n    mixins.BlockRangeMixIn,\n    mixins.AssignTypeMixin,\n    Statement,\n):\n    \"\"\"Class representing an :class:`ast.For` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('for thing in things: print(thing)')\n    >>> node\n    <For l.1 at 0x7f23b2e8cf28>\n    \"\"\"\n\n    _astroid_fields = (\"target\", \"iter\", \"body\", \"orelse\")\n    _other_other_fields = (\"type_annotation\",)\n    _multi_line_block_fields = (\"body\", \"orelse\")\n\n    optional_assign = True\n    \"\"\"Whether this node optionally assigns a variable.\n\n    This is always ``True`` for :class:`For` nodes.\n    \"\"\"\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.target: NodeNG | None = None\n        \"\"\"What the loop assigns to.\"\"\"\n\n        self.iter: NodeNG | None = None\n        \"\"\"What the loop iterates over.\"\"\"\n\n        self.body: list[NodeNG] = []\n        \"\"\"The contents of the body of the loop.\"\"\"\n\n        self.orelse: list[NodeNG] = []\n        \"\"\"The contents of the ``else`` block of the loop.\"\"\"\n\n        self.type_annotation: NodeNG | None = None  # can be None\n        \"\"\"If present, this will contain the type annotation passed by a type comment\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    # pylint: disable=redefined-builtin; had to use the same name as builtin ast module.\n    def postinit(\n        self,\n        target: NodeNG | None = None,\n        iter: NodeNG | None = None,\n        body: list[NodeNG] | None = None,\n        orelse: list[NodeNG] | None = None,\n        type_annotation: NodeNG | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param target: What the loop assigns to.\n\n        :param iter: What the loop iterates over.\n\n        :param body: The contents of the body of the loop.\n\n        :param orelse: The contents of the ``else`` block of the loop.\n        \"\"\"\n        self.target = target\n        self.iter = iter\n        if body is not None:\n            self.body = body\n        if orelse is not None:\n            self.orelse = orelse\n        self.type_annotation = type_annotation\n\n    assigned_stmts: ClassVar[AssignedStmtsCall[For]]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n    @cached_property\n    def blockstart_tolineno(self):\n        \"\"\"The line on which the beginning of this block ends.\n\n        :type: int\n        \"\"\"\n        return self.iter.tolineno\n\n    def get_children(self):\n        yield self.target\n        yield self.iter\n\n        yield from self.body\n        yield from self.orelse\n\n\nclass AsyncFor(For):\n    \"\"\"Class representing an :class:`ast.AsyncFor` node.\n\n    An :class:`AsyncFor` is an asynchronous :class:`For` built with\n    the ``async`` keyword.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    async def func(things):\n        async for thing in things:\n            print(thing)\n    ''')\n    >>> node\n    <AsyncFunctionDef.func l.2 at 0x7f23b2e416d8>\n    >>> node.body[0]\n    <AsyncFor l.3 at 0x7f23b2e417b8>\n    \"\"\"\n\n\nclass Await(NodeNG):\n    \"\"\"Class representing an :class:`ast.Await` node.\n\n    An :class:`Await` is the ``await`` keyword.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    async def func(things):\n        await other_func()\n    ''')\n    >>> node\n    <AsyncFunctionDef.func l.2 at 0x7f23b2e41748>\n    >>> node.body[0]\n    <Expr l.3 at 0x7f23b2e419e8>\n    >>> list(node.body[0].get_children())[0]\n    <Await l.3 at 0x7f23b2e41a20>\n    \"\"\"\n\n    _astroid_fields = (\"value\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.value: NodeNG | None = None\n        \"\"\"What to wait for.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, value: NodeNG | None = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: What to wait for.\n        \"\"\"\n        self.value = value\n\n    def get_children(self):\n        yield self.value\n\n\nclass ImportFrom(mixins.NoChildrenMixin, mixins.ImportFromMixin, Statement):\n    \"\"\"Class representing an :class:`ast.ImportFrom` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('from my_package import my_module')\n    >>> node\n    <ImportFrom l.1 at 0x7f23b2e415c0>\n    \"\"\"\n\n    _other_fields = (\"modname\", \"names\", \"level\")\n\n    def __init__(\n        self,\n        fromname: str | None,\n        names: list[tuple[str, str | None]],\n        level: int | None = 0,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param fromname: The module that is being imported from.\n\n        :param names: What is being imported from the module.\n\n        :param level: The level of relative import.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.modname: str | None = fromname  # can be None\n        \"\"\"The module that is being imported from.\n\n        This is ``None`` for relative imports.\n        \"\"\"\n\n        self.names: list[tuple[str, str | None]] = names\n        \"\"\"What is being imported from the module.\n\n        Each entry is a :class:`tuple` of the name being imported,\n        and the alias that the name is assigned to (if any).\n        \"\"\"\n\n        # TODO When is 'level' None?\n        self.level: int | None = level  # can be None\n        \"\"\"The level of relative import.\n\n        Essentially this is the number of dots in the import.\n        This is always 0 for absolute imports.\n        \"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n\nclass Attribute(NodeNG):\n    \"\"\"Class representing an :class:`ast.Attribute` node.\"\"\"\n\n    _astroid_fields = (\"expr\",)\n    _other_fields = (\"attrname\",)\n\n    @decorators.deprecate_default_argument_values(attrname=\"str\")\n    def __init__(\n        self,\n        attrname: str | None = None,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param attrname: The name of the attribute.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.expr: NodeNG | None = None\n        \"\"\"The name that this node represents.\n\n        :type: Name or None\n        \"\"\"\n\n        self.attrname: str | None = attrname\n        \"\"\"The name of the attribute.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, expr: NodeNG | None = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param expr: The name that this node represents.\n        :type expr: Name or None\n        \"\"\"\n        self.expr = expr\n\n    def get_children(self):\n        yield self.expr\n\n\nclass Global(mixins.NoChildrenMixin, Statement):\n    \"\"\"Class representing an :class:`ast.Global` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('global a_global')\n    >>> node\n    <Global l.1 at 0x7f23b2e9de10>\n    \"\"\"\n\n    _other_fields = (\"names\",)\n\n    def __init__(\n        self,\n        names: list[str],\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param names: The names being declared as global.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.names: list[str] = names\n        \"\"\"The names being declared as global.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def _infer_name(self, frame, name):\n        return name\n\n\nclass If(mixins.MultiLineBlockMixin, mixins.BlockRangeMixIn, Statement):\n    \"\"\"Class representing an :class:`ast.If` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('if condition: print(True)')\n    >>> node\n    <If l.1 at 0x7f23b2e9dd30>\n    \"\"\"\n\n    _astroid_fields = (\"test\", \"body\", \"orelse\")\n    _multi_line_block_fields = (\"body\", \"orelse\")\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.test: NodeNG | None = None\n        \"\"\"The condition that the statement tests.\"\"\"\n\n        self.body: list[NodeNG] = []\n        \"\"\"The contents of the block.\"\"\"\n\n        self.orelse: list[NodeNG] = []\n        \"\"\"The contents of the ``else`` block.\"\"\"\n\n        self.is_orelse: bool = False\n        \"\"\"Whether the if-statement is the orelse-block of another if statement.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        test: NodeNG | None = None,\n        body: list[NodeNG] | None = None,\n        orelse: list[NodeNG] | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param test: The condition that the statement tests.\n\n        :param body: The contents of the block.\n\n        :param orelse: The contents of the ``else`` block.\n        \"\"\"\n        self.test = test\n        if body is not None:\n            self.body = body\n        if orelse is not None:\n            self.orelse = orelse\n        if isinstance(self.parent, If) and self in self.parent.orelse:\n            self.is_orelse = True\n\n    @cached_property\n    def blockstart_tolineno(self):\n        \"\"\"The line on which the beginning of this block ends.\n\n        :type: int\n        \"\"\"\n        return self.test.tolineno\n\n    def block_range(self, lineno):\n        \"\"\"Get a range from the given line number to where this node ends.\n\n        :param lineno: The line number to start the range at.\n        :type lineno: int\n\n        :returns: The range of line numbers that this node belongs to,\n            starting at the given line number.\n        :rtype: tuple(int, int)\n        \"\"\"\n        if lineno == self.body[0].fromlineno:\n            return lineno, lineno\n        if lineno <= self.body[-1].tolineno:\n            return lineno, self.body[-1].tolineno\n        return self._elsed_block_range(lineno, self.orelse, self.body[0].fromlineno - 1)\n\n    def get_children(self):\n        yield self.test\n\n        yield from self.body\n        yield from self.orelse\n\n    def has_elif_block(self):\n        return len(self.orelse) == 1 and isinstance(self.orelse[0], If)\n\n    def _get_yield_nodes_skip_lambdas(self):\n        \"\"\"An If node can contain a Yield node in the test\"\"\"\n        yield from self.test._get_yield_nodes_skip_lambdas()\n        yield from super()._get_yield_nodes_skip_lambdas()\n\n    def is_sys_guard(self) -> bool:\n        \"\"\"Return True if IF stmt is a sys.version_info guard.\n\n        >>> import astroid\n        >>> node = astroid.extract_node('''\n        import sys\n        if sys.version_info > (3, 8):\n            from typing import Literal\n        else:\n            from typing_extensions import Literal\n        ''')\n        >>> node.is_sys_guard()\n        True\n        \"\"\"\n        warnings.warn(\n            \"The 'is_sys_guard' function is deprecated and will be removed in astroid 3.0.0 \"\n            \"It has been moved to pylint and can be imported from 'pylint.checkers.utils' \"\n            \"starting with pylint 2.12\",\n            DeprecationWarning,\n        )\n        if isinstance(self.test, Compare):\n            value = self.test.left\n            if isinstance(value, Subscript):\n                value = value.value\n            if isinstance(value, Attribute) and value.as_string() == \"sys.version_info\":\n                return True\n\n        return False\n\n    def is_typing_guard(self) -> bool:\n        \"\"\"Return True if IF stmt is a typing guard.\n\n        >>> import astroid\n        >>> node = astroid.extract_node('''\n        from typing import TYPE_CHECKING\n        if TYPE_CHECKING:\n            from xyz import a\n        ''')\n        >>> node.is_typing_guard()\n        True\n        \"\"\"\n        warnings.warn(\n            \"The 'is_typing_guard' function is deprecated and will be removed in astroid 3.0.0 \"\n            \"It has been moved to pylint and can be imported from 'pylint.checkers.utils' \"\n            \"starting with pylint 2.12\",\n            DeprecationWarning,\n        )\n        return isinstance(\n            self.test, (Name, Attribute)\n        ) and self.test.as_string().endswith(\"TYPE_CHECKING\")\n\n\nclass IfExp(NodeNG):\n    \"\"\"Class representing an :class:`ast.IfExp` node.\n    >>> import astroid\n    >>> node = astroid.extract_node('value if condition else other')\n    >>> node\n    <IfExp l.1 at 0x7f23b2e9dbe0>\n    \"\"\"\n\n    _astroid_fields = (\"test\", \"body\", \"orelse\")\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.test: NodeNG | None = None\n        \"\"\"The condition that the statement tests.\"\"\"\n\n        self.body: NodeNG | None = None\n        \"\"\"The contents of the block.\"\"\"\n\n        self.orelse: NodeNG | None = None\n        \"\"\"The contents of the ``else`` block.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        test: NodeNG | None = None,\n        body: NodeNG | None = None,\n        orelse: NodeNG | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param test: The condition that the statement tests.\n\n        :param body: The contents of the block.\n\n        :param orelse: The contents of the ``else`` block.\n        \"\"\"\n        self.test = test\n        self.body = body\n        self.orelse = orelse\n\n    def get_children(self):\n        yield self.test\n        yield self.body\n        yield self.orelse\n\n    def op_left_associative(self):\n        # `1 if True else 2 if False else 3` is parsed as\n        # `1 if True else (2 if False else 3)`\n        return False\n\n\nclass Import(mixins.NoChildrenMixin, mixins.ImportFromMixin, Statement):\n    \"\"\"Class representing an :class:`ast.Import` node.\n    >>> import astroid\n    >>> node = astroid.extract_node('import astroid')\n    >>> node\n    <Import l.1 at 0x7f23b2e4e5c0>\n    \"\"\"\n\n    _other_fields = (\"names\",)\n\n    @decorators.deprecate_default_argument_values(names=\"list[tuple[str, str | None]]\")\n    def __init__(\n        self,\n        names: list[tuple[str, str | None]] | None = None,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param names: The names being imported.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.names: list[tuple[str, str | None]] = names or []\n        \"\"\"The names being imported.\n\n        Each entry is a :class:`tuple` of the name being imported,\n        and the alias that the name is assigned to (if any).\n        \"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n\nclass Index(NodeNG):\n    \"\"\"Class representing an :class:`ast.Index` node.\n\n    An :class:`Index` is a simple subscript.\n\n    Deprecated since v2.6.0 - Now part of the :class:`Subscript` node.\n    Will be removed with the release of v2.7.0\n    \"\"\"\n\n\nclass Keyword(NodeNG):\n    \"\"\"Class representing an :class:`ast.keyword` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('function(a_kwarg=True)')\n    >>> node\n    <Call l.1 at 0x7f23b2e9e320>\n    >>> node.keywords\n    [<Keyword l.1 at 0x7f23b2e9e9b0>]\n    \"\"\"\n\n    _astroid_fields = (\"value\",)\n    _other_fields = (\"arg\",)\n\n    def __init__(\n        self,\n        arg: str | None = None,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param arg: The argument being assigned to.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.arg: str | None = arg  # can be None\n        \"\"\"The argument being assigned to.\"\"\"\n\n        self.value: NodeNG | None = None\n        \"\"\"The value being assigned to the keyword argument.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, value: NodeNG | None = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: The value being assigned to the keyword argument.\n        \"\"\"\n        self.value = value\n\n    def get_children(self):\n        yield self.value\n\n\nclass List(BaseContainer):\n    \"\"\"Class representing an :class:`ast.List` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('[1, 2, 3]')\n    >>> node\n    <List.list l.1 at 0x7f23b2e9e128>\n    \"\"\"\n\n    _other_fields = (\"ctx\",)\n\n    def __init__(\n        self,\n        ctx: Context | None = None,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param ctx: Whether the list is assigned to or loaded from.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.ctx: Context | None = ctx\n        \"\"\"Whether the list is assigned to or loaded from.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    assigned_stmts: ClassVar[AssignedStmtsCall[List]]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n    def pytype(self):\n        \"\"\"Get the name of the type that this node represents.\n\n        :returns: The name of the type.\n        :rtype: str\n        \"\"\"\n        return \"builtins.list\"\n\n    def getitem(self, index, context=None):\n        \"\"\"Get an item from this node.\n\n        :param index: The node to use as a subscript index.\n        :type index: Const or Slice\n        \"\"\"\n        return _container_getitem(self, self.elts, index, context=context)\n\n\nclass Nonlocal(mixins.NoChildrenMixin, Statement):\n    \"\"\"Class representing an :class:`ast.Nonlocal` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    def function():\n        nonlocal var\n    ''')\n    >>> node\n    <FunctionDef.function l.2 at 0x7f23b2e9e208>\n    >>> node.body[0]\n    <Nonlocal l.3 at 0x7f23b2e9e908>\n    \"\"\"\n\n    _other_fields = (\"names\",)\n\n    def __init__(\n        self,\n        names: list[str],\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param names: The names being declared as not local.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.names: list[str] = names\n        \"\"\"The names being declared as not local.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def _infer_name(self, frame, name):\n        return name\n\n\nclass Pass(mixins.NoChildrenMixin, Statement):\n    \"\"\"Class representing an :class:`ast.Pass` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('pass')\n    >>> node\n    <Pass l.1 at 0x7f23b2e9e748>\n    \"\"\"\n\n\nclass Raise(Statement):\n    \"\"\"Class representing an :class:`ast.Raise` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('raise RuntimeError(\"Something bad happened!\")')\n    >>> node\n    <Raise l.1 at 0x7f23b2e9e828>\n    \"\"\"\n\n    _astroid_fields = (\"exc\", \"cause\")\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.exc: NodeNG | None = None  # can be None\n        \"\"\"What is being raised.\"\"\"\n\n        self.cause: NodeNG | None = None  # can be None\n        \"\"\"The exception being used to raise this one.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        exc: NodeNG | None = None,\n        cause: NodeNG | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param exc: What is being raised.\n\n        :param cause: The exception being used to raise this one.\n        \"\"\"\n        self.exc = exc\n        self.cause = cause\n\n    def raises_not_implemented(self):\n        \"\"\"Check if this node raises a :class:`NotImplementedError`.\n\n        :returns: True if this node raises a :class:`NotImplementedError`,\n            False otherwise.\n        :rtype: bool\n        \"\"\"\n        if not self.exc:\n            return False\n        return any(\n            name.name == \"NotImplementedError\" for name in self.exc._get_name_nodes()\n        )\n\n    def get_children(self):\n        if self.exc is not None:\n            yield self.exc\n\n        if self.cause is not None:\n            yield self.cause\n\n\nclass Return(Statement):\n    \"\"\"Class representing an :class:`ast.Return` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('return True')\n    >>> node\n    <Return l.1 at 0x7f23b8211908>\n    \"\"\"\n\n    _astroid_fields = (\"value\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.value: NodeNG | None = None  # can be None\n        \"\"\"The value being returned.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, value: NodeNG | None = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: The value being returned.\n        \"\"\"\n        self.value = value\n\n    def get_children(self):\n        if self.value is not None:\n            yield self.value\n\n    def is_tuple_return(self):\n        return isinstance(self.value, Tuple)\n\n    def _get_return_nodes_skip_functions(self):\n        yield self\n\n\nclass Set(BaseContainer):\n    \"\"\"Class representing an :class:`ast.Set` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('{1, 2, 3}')\n    >>> node\n    <Set.set l.1 at 0x7f23b2e71d68>\n    \"\"\"\n\n    def pytype(self):\n        \"\"\"Get the name of the type that this node represents.\n\n        :returns: The name of the type.\n        :rtype: str\n        \"\"\"\n        return \"builtins.set\"\n\n\nclass Slice(NodeNG):\n    \"\"\"Class representing an :class:`ast.Slice` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('things[1:3]')\n    >>> node\n    <Subscript l.1 at 0x7f23b2e71f60>\n    >>> node.slice\n    <Slice l.1 at 0x7f23b2e71e80>\n    \"\"\"\n\n    _astroid_fields = (\"lower\", \"upper\", \"step\")\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.lower: NodeNG | None = None  # can be None\n        \"\"\"The lower index in the slice.\"\"\"\n\n        self.upper: NodeNG | None = None  # can be None\n        \"\"\"The upper index in the slice.\"\"\"\n\n        self.step: NodeNG | None = None  # can be None\n        \"\"\"The step to take between indexes.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        lower: NodeNG | None = None,\n        upper: NodeNG | None = None,\n        step: NodeNG | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param lower: The lower index in the slice.\n\n        :param upper: The upper index in the slice.\n\n        :param step: The step to take between index.\n        \"\"\"\n        self.lower = lower\n        self.upper = upper\n        self.step = step\n\n    def _wrap_attribute(self, attr):\n        \"\"\"Wrap the empty attributes of the Slice in a Const node.\"\"\"\n        if not attr:\n            const = const_factory(attr)\n            const.parent = self\n            return const\n        return attr\n\n    @cached_property\n    def _proxied(self):\n        builtins = AstroidManager().builtins_module\n        return builtins.getattr(\"slice\")[0]\n\n    def pytype(self):\n        \"\"\"Get the name of the type that this node represents.\n\n        :returns: The name of the type.\n        :rtype: str\n        \"\"\"\n        return \"builtins.slice\"\n\n    def igetattr(self, attrname, context=None):\n        \"\"\"Infer the possible values of the given attribute on the slice.\n\n        :param attrname: The name of the attribute to infer.\n        :type attrname: str\n\n        :returns: The inferred possible values.\n        :rtype: iterable(NodeNG)\n        \"\"\"\n        if attrname == \"start\":\n            yield self._wrap_attribute(self.lower)\n        elif attrname == \"stop\":\n            yield self._wrap_attribute(self.upper)\n        elif attrname == \"step\":\n            yield self._wrap_attribute(self.step)\n        else:\n            yield from self.getattr(attrname, context=context)\n\n    def getattr(self, attrname, context=None):\n        return self._proxied.getattr(attrname, context)\n\n    def get_children(self):\n        if self.lower is not None:\n            yield self.lower\n\n        if self.upper is not None:\n            yield self.upper\n\n        if self.step is not None:\n            yield self.step\n\n\nclass Starred(mixins.ParentAssignTypeMixin, NodeNG):\n    \"\"\"Class representing an :class:`ast.Starred` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('*args')\n    >>> node\n    <Starred l.1 at 0x7f23b2e41978>\n    \"\"\"\n\n    _astroid_fields = (\"value\",)\n    _other_fields = (\"ctx\",)\n\n    def __init__(\n        self,\n        ctx: Context | None = None,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param ctx: Whether the list is assigned to or loaded from.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.value: NodeNG | None = None\n        \"\"\"What is being unpacked.\"\"\"\n\n        self.ctx: Context | None = ctx\n        \"\"\"Whether the starred item is assigned to or loaded from.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, value: NodeNG | None = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: What is being unpacked.\n        \"\"\"\n        self.value = value\n\n    assigned_stmts: ClassVar[AssignedStmtsCall[Starred]]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n    def get_children(self):\n        yield self.value\n\n\nclass Subscript(NodeNG):\n    \"\"\"Class representing an :class:`ast.Subscript` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('things[1:3]')\n    >>> node\n    <Subscript l.1 at 0x7f23b2e71f60>\n    \"\"\"\n\n    _astroid_fields = (\"value\", \"slice\")\n    _other_fields = (\"ctx\",)\n\n    def __init__(\n        self,\n        ctx: Context | None = None,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param ctx: Whether the subscripted item is assigned to or loaded from.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.value: NodeNG | None = None\n        \"\"\"What is being indexed.\"\"\"\n\n        self.slice: NodeNG | None = None\n        \"\"\"The slice being used to lookup.\"\"\"\n\n        self.ctx: Context | None = ctx\n        \"\"\"Whether the subscripted item is assigned to or loaded from.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    # pylint: disable=redefined-builtin; had to use the same name as builtin ast module.\n    def postinit(\n        self, value: NodeNG | None = None, slice: NodeNG | None = None\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: What is being indexed.\n\n        :param slice: The slice being used to lookup.\n        \"\"\"\n        self.value = value\n        self.slice = slice\n\n    def get_children(self):\n        yield self.value\n        yield self.slice\n\n\nclass TryExcept(mixins.MultiLineBlockMixin, mixins.BlockRangeMixIn, Statement):\n    \"\"\"Class representing an :class:`ast.TryExcept` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n        try:\n            do_something()\n        except Exception as error:\n            print(\"Error!\")\n        ''')\n    >>> node\n    <TryExcept l.2 at 0x7f23b2e9d908>\n    \"\"\"\n\n    _astroid_fields = (\"body\", \"handlers\", \"orelse\")\n    _multi_line_block_fields = (\"body\", \"handlers\", \"orelse\")\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.body: list[NodeNG] = []\n        \"\"\"The contents of the block to catch exceptions from.\"\"\"\n\n        self.handlers: list[ExceptHandler] = []\n        \"\"\"The exception handlers.\"\"\"\n\n        self.orelse: list[NodeNG] = []\n        \"\"\"The contents of the ``else`` block.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        body: list[NodeNG] | None = None,\n        handlers: list[ExceptHandler] | None = None,\n        orelse: list[NodeNG] | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param body: The contents of the block to catch exceptions from.\n\n        :param handlers: The exception handlers.\n\n        :param orelse: The contents of the ``else`` block.\n        \"\"\"\n        if body is not None:\n            self.body = body\n        if handlers is not None:\n            self.handlers = handlers\n        if orelse is not None:\n            self.orelse = orelse\n\n    def _infer_name(self, frame, name):\n        return name\n\n    def block_range(self, lineno):\n        \"\"\"Get a range from the given line number to where this node ends.\n\n        :param lineno: The line number to start the range at.\n        :type lineno: int\n\n        :returns: The range of line numbers that this node belongs to,\n            starting at the given line number.\n        :rtype: tuple(int, int)\n        \"\"\"\n        last = None\n        for exhandler in self.handlers:\n            if exhandler.type and lineno == exhandler.type.fromlineno:\n                return lineno, lineno\n            if exhandler.body[0].fromlineno <= lineno <= exhandler.body[-1].tolineno:\n                return lineno, exhandler.body[-1].tolineno\n            if last is None:\n                last = exhandler.body[0].fromlineno - 1\n        return self._elsed_block_range(lineno, self.orelse, last)\n\n    def get_children(self):\n        yield from self.body\n\n        yield from self.handlers or ()\n        yield from self.orelse or ()\n\n\nclass TryFinally(mixins.MultiLineBlockMixin, mixins.BlockRangeMixIn, Statement):\n    \"\"\"Class representing an :class:`ast.TryFinally` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    try:\n        do_something()\n    except Exception as error:\n        print(\"Error!\")\n    finally:\n        print(\"Cleanup!\")\n    ''')\n    >>> node\n    <TryFinally l.2 at 0x7f23b2e41d68>\n    \"\"\"\n\n    _astroid_fields = (\"body\", \"finalbody\")\n    _multi_line_block_fields = (\"body\", \"finalbody\")\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.body: list[NodeNG | TryExcept] = []\n        \"\"\"The try-except that the finally is attached to.\"\"\"\n\n        self.finalbody: list[NodeNG] = []\n        \"\"\"The contents of the ``finally`` block.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        body: list[NodeNG | TryExcept] | None = None,\n        finalbody: list[NodeNG] | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param body: The try-except that the finally is attached to.\n\n        :param finalbody: The contents of the ``finally`` block.\n        \"\"\"\n        if body is not None:\n            self.body = body\n        if finalbody is not None:\n            self.finalbody = finalbody\n\n    def block_range(self, lineno):\n        \"\"\"Get a range from the given line number to where this node ends.\n\n        :param lineno: The line number to start the range at.\n        :type lineno: int\n\n        :returns: The range of line numbers that this node belongs to,\n            starting at the given line number.\n        :rtype: tuple(int, int)\n        \"\"\"\n        child = self.body[0]\n        # py2.5 try: except: finally:\n        if (\n            isinstance(child, TryExcept)\n            and child.fromlineno == self.fromlineno\n            and child.tolineno >= lineno > self.fromlineno\n        ):\n            return child.block_range(lineno)\n        return self._elsed_block_range(lineno, self.finalbody)\n\n    def get_children(self):\n        yield from self.body\n        yield from self.finalbody\n\n\nclass Tuple(BaseContainer):\n    \"\"\"Class representing an :class:`ast.Tuple` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('(1, 2, 3)')\n    >>> node\n    <Tuple.tuple l.1 at 0x7f23b2e41780>\n    \"\"\"\n\n    _other_fields = (\"ctx\",)\n\n    def __init__(\n        self,\n        ctx: Context | None = None,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param ctx: Whether the tuple is assigned to or loaded from.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.ctx: Context | None = ctx\n        \"\"\"Whether the tuple is assigned to or loaded from.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    assigned_stmts: ClassVar[AssignedStmtsCall[Tuple]]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n    def pytype(self):\n        \"\"\"Get the name of the type that this node represents.\n\n        :returns: The name of the type.\n        :rtype: str\n        \"\"\"\n        return \"builtins.tuple\"\n\n    def getitem(self, index, context=None):\n        \"\"\"Get an item from this node.\n\n        :param index: The node to use as a subscript index.\n        :type index: Const or Slice\n        \"\"\"\n        return _container_getitem(self, self.elts, index, context=context)\n\n\nclass UnaryOp(NodeNG):\n    \"\"\"Class representing an :class:`ast.UnaryOp` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('-5')\n    >>> node\n    <UnaryOp l.1 at 0x7f23b2e4e198>\n    \"\"\"\n\n    _astroid_fields = (\"operand\",)\n    _other_fields = (\"op\",)\n\n    @decorators.deprecate_default_argument_values(op=\"str\")\n    def __init__(\n        self,\n        op: str | None = None,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param op: The operator.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.op: str | None = op\n        \"\"\"The operator.\"\"\"\n\n        self.operand: NodeNG | None = None\n        \"\"\"What the unary operator is applied to.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, operand: NodeNG | None = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param operand: What the unary operator is applied to.\n        \"\"\"\n        self.operand = operand\n\n    # This is set by inference.py\n    def _infer_unaryop(self, context=None):\n        raise NotImplementedError\n\n    def type_errors(self, context=None):\n        \"\"\"Get a list of type errors which can occur during inference.\n\n        Each TypeError is represented by a :class:`BadBinaryOperationMessage`,\n        which holds the original exception.\n\n        :returns: The list of possible type errors.\n        :rtype: list(BadBinaryOperationMessage)\n        \"\"\"\n        try:\n            results = self._infer_unaryop(context=context)\n            return [\n                result\n                for result in results\n                if isinstance(result, util.BadUnaryOperationMessage)\n            ]\n        except InferenceError:\n            return []\n\n    def get_children(self):\n        yield self.operand\n\n    def op_precedence(self):\n        if self.op == \"not\":\n            return OP_PRECEDENCE[self.op]\n\n        return super().op_precedence()\n\n\nclass While(mixins.MultiLineBlockMixin, mixins.BlockRangeMixIn, Statement):\n    \"\"\"Class representing an :class:`ast.While` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    while condition():\n        print(\"True\")\n    ''')\n    >>> node\n    <While l.2 at 0x7f23b2e4e390>\n    \"\"\"\n\n    _astroid_fields = (\"test\", \"body\", \"orelse\")\n    _multi_line_block_fields = (\"body\", \"orelse\")\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.test: NodeNG | None = None\n        \"\"\"The condition that the loop tests.\"\"\"\n\n        self.body: list[NodeNG] = []\n        \"\"\"The contents of the loop.\"\"\"\n\n        self.orelse: list[NodeNG] = []\n        \"\"\"The contents of the ``else`` block.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        test: NodeNG | None = None,\n        body: list[NodeNG] | None = None,\n        orelse: list[NodeNG] | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param test: The condition that the loop tests.\n\n        :param body: The contents of the loop.\n\n        :param orelse: The contents of the ``else`` block.\n        \"\"\"\n        self.test = test\n        if body is not None:\n            self.body = body\n        if orelse is not None:\n            self.orelse = orelse\n\n    @cached_property\n    def blockstart_tolineno(self):\n        \"\"\"The line on which the beginning of this block ends.\n\n        :type: int\n        \"\"\"\n        return self.test.tolineno\n\n    def block_range(self, lineno):\n        \"\"\"Get a range from the given line number to where this node ends.\n\n        :param lineno: The line number to start the range at.\n        :type lineno: int\n\n        :returns: The range of line numbers that this node belongs to,\n            starting at the given line number.\n        :rtype: tuple(int, int)\n        \"\"\"\n        return self._elsed_block_range(lineno, self.orelse)\n\n    def get_children(self):\n        yield self.test\n\n        yield from self.body\n        yield from self.orelse\n\n    def _get_yield_nodes_skip_lambdas(self):\n        \"\"\"A While node can contain a Yield node in the test\"\"\"\n        yield from self.test._get_yield_nodes_skip_lambdas()\n        yield from super()._get_yield_nodes_skip_lambdas()\n\n\nclass With(\n    mixins.MultiLineBlockMixin,\n    mixins.BlockRangeMixIn,\n    mixins.AssignTypeMixin,\n    Statement,\n):\n    \"\"\"Class representing an :class:`ast.With` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    with open(file_path) as file_:\n        print(file_.read())\n    ''')\n    >>> node\n    <With l.2 at 0x7f23b2e4e710>\n    \"\"\"\n\n    _astroid_fields = (\"items\", \"body\")\n    _other_other_fields = (\"type_annotation\",)\n    _multi_line_block_fields = (\"body\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.items: list[tuple[NodeNG, NodeNG | None]] = []\n        \"\"\"The pairs of context managers and the names they are assigned to.\"\"\"\n\n        self.body: list[NodeNG] = []\n        \"\"\"The contents of the ``with`` block.\"\"\"\n\n        self.type_annotation: NodeNG | None = None  # can be None\n        \"\"\"If present, this will contain the type annotation passed by a type comment\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        items: list[tuple[NodeNG, NodeNG | None]] | None = None,\n        body: list[NodeNG] | None = None,\n        type_annotation: NodeNG | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param items: The pairs of context managers and the names\n            they are assigned to.\n\n        :param body: The contents of the ``with`` block.\n        \"\"\"\n        if items is not None:\n            self.items = items\n        if body is not None:\n            self.body = body\n        self.type_annotation = type_annotation\n\n    assigned_stmts: ClassVar[AssignedStmtsCall[With]]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n    @cached_property\n    def blockstart_tolineno(self):\n        \"\"\"The line on which the beginning of this block ends.\n\n        :type: int\n        \"\"\"\n        return self.items[-1][0].tolineno\n\n    def get_children(self):\n        \"\"\"Get the child nodes below this node.\n\n        :returns: The children.\n        :rtype: iterable(NodeNG)\n        \"\"\"\n        for expr, var in self.items:\n            yield expr\n            if var:\n                yield var\n        yield from self.body\n\n\nclass AsyncWith(With):\n    \"\"\"Asynchronous ``with`` built with the ``async`` keyword.\"\"\"\n\n\nclass Yield(NodeNG):\n    \"\"\"Class representing an :class:`ast.Yield` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('yield True')\n    >>> node\n    <Yield l.1 at 0x7f23b2e4e5f8>\n    \"\"\"\n\n    _astroid_fields = (\"value\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.value: NodeNG | None = None  # can be None\n        \"\"\"The value to yield.\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, value: NodeNG | None = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: The value to yield.\n        \"\"\"\n        self.value = value\n\n    def get_children(self):\n        if self.value is not None:\n            yield self.value\n\n    def _get_yield_nodes_skip_lambdas(self):\n        yield self\n\n\nclass YieldFrom(Yield):  # TODO value is required, not optional\n    \"\"\"Class representing an :class:`ast.YieldFrom` node.\"\"\"\n\n\nclass DictUnpack(mixins.NoChildrenMixin, NodeNG):\n    \"\"\"Represents the unpacking of dicts into dicts using :pep:`448`.\"\"\"\n\n\nclass FormattedValue(NodeNG):\n    \"\"\"Class representing an :class:`ast.FormattedValue` node.\n\n    Represents a :pep:`498` format string.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('f\"Format {type_}\"')\n    >>> node\n    <JoinedStr l.1 at 0x7f23b2e4ed30>\n    >>> node.values\n    [<Const.str l.1 at 0x7f23b2e4eda0>, <FormattedValue l.1 at 0x7f23b2e4edd8>]\n    \"\"\"\n\n    _astroid_fields = (\"value\", \"format_spec\")\n    _other_fields = (\"conversion\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.value: NodeNG\n        \"\"\"The value to be formatted into the string.\"\"\"\n\n        self.conversion: int | None = None  # can be None\n        \"\"\"The type of formatting to be applied to the value.\n\n        .. seealso::\n            :class:`ast.FormattedValue`\n        \"\"\"\n\n        self.format_spec: NodeNG | None = None  # can be None\n        \"\"\"The formatting to be applied to the value.\n\n        .. seealso::\n            :class:`ast.FormattedValue`\n\n        :type: JoinedStr or None\n        \"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        value: NodeNG,\n        conversion: int | None = None,\n        format_spec: NodeNG | None = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: The value to be formatted into the string.\n\n        :param conversion: The type of formatting to be applied to the value.\n\n        :param format_spec: The formatting to be applied to the value.\n        :type format_spec: JoinedStr or None\n        \"\"\"\n        self.value = value\n        self.conversion = conversion\n        self.format_spec = format_spec\n\n    def get_children(self):\n        yield self.value\n\n        if self.format_spec is not None:\n            yield self.format_spec\n\n\nclass JoinedStr(NodeNG):\n    \"\"\"Represents a list of string expressions to be joined.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('f\"Format {type_}\"')\n    >>> node\n    <JoinedStr l.1 at 0x7f23b2e4ed30>\n    \"\"\"\n\n    _astroid_fields = (\"values\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.values: list[NodeNG] = []\n        \"\"\"The string expressions to be joined.\n\n        :type: list(FormattedValue or Const)\n        \"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, values: list[NodeNG] | None = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: The string expressions to be joined.\n\n        :type: list(FormattedValue or Const)\n        \"\"\"\n        if values is not None:\n            self.values = values\n\n    def get_children(self):\n        yield from self.values\n\n\nclass NamedExpr(mixins.AssignTypeMixin, NodeNG):\n    \"\"\"Represents the assignment from the assignment expression\n\n    >>> import astroid\n    >>> module = astroid.parse('if a := 1: pass')\n    >>> module.body[0].test\n    <NamedExpr l.1 at 0x7f23b2e4ed30>\n    \"\"\"\n\n    _astroid_fields = (\"target\", \"value\")\n\n    optional_assign = True\n    \"\"\"Whether this node optionally assigns a variable.\n\n    Since NamedExpr are not always called they do not always assign.\"\"\"\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param end_lineno: The last line this node appears on in the source code.\n\n        :param end_col_offset: The end column this node appears on in the\n            source code. Note: This is after the last symbol.\n        \"\"\"\n        self.target: NodeNG\n        \"\"\"The assignment target\n\n        :type: Name\n        \"\"\"\n\n        self.value: NodeNG\n        \"\"\"The value that gets assigned in the expression\"\"\"\n\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, target: NodeNG, value: NodeNG) -> None:\n        self.target = target\n        self.value = value\n\n    assigned_stmts: ClassVar[AssignedStmtsCall[NamedExpr]]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n    def frame(\n        self, *, future: Literal[None, True] = None\n    ) -> nodes.FunctionDef | nodes.Module | nodes.ClassDef | nodes.Lambda:\n        \"\"\"The first parent frame node.\n\n        A frame node is a :class:`Module`, :class:`FunctionDef`,\n        or :class:`ClassDef`.\n\n        :returns: The first parent frame node.\n        \"\"\"\n        if not self.parent:\n            raise ParentMissingError(target=self)\n\n        # For certain parents NamedExpr evaluate to the scope of the parent\n        if isinstance(self.parent, (Arguments, Keyword, Comprehension)):\n            if not self.parent.parent:\n                raise ParentMissingError(target=self.parent)\n            if not self.parent.parent.parent:\n                raise ParentMissingError(target=self.parent.parent)\n            return self.parent.parent.parent.frame(future=True)\n\n        return self.parent.frame(future=True)\n\n    def scope(self) -> LocalsDictNodeNG:\n        \"\"\"The first parent node defining a new scope.\n        These can be Module, FunctionDef, ClassDef, Lambda, or GeneratorExp nodes.\n\n        :returns: The first parent scope node.\n        \"\"\"\n        if not self.parent:\n            raise ParentMissingError(target=self)\n\n        # For certain parents NamedExpr evaluate to the scope of the parent\n        if isinstance(self.parent, (Arguments, Keyword, Comprehension)):\n            if not self.parent.parent:\n                raise ParentMissingError(target=self.parent)\n            if not self.parent.parent.parent:\n                raise ParentMissingError(target=self.parent.parent)\n            return self.parent.parent.parent.scope()\n\n        return self.parent.scope()\n\n    def set_local(self, name: str, stmt: AssignName) -> None:\n        \"\"\"Define that the given name is declared in the given statement node.\n        NamedExpr's in Arguments, Keyword or Comprehension are evaluated in their\n        parent's parent scope. So we add to their frame's locals.\n\n        .. seealso:: :meth:`scope`\n\n        :param name: The name that is being defined.\n\n        :param stmt: The statement that defines the given name.\n        \"\"\"\n        self.frame(future=True).set_local(name, stmt)\n\n\nclass Unknown(mixins.AssignTypeMixin, NodeNG):\n    \"\"\"This node represents a node in a constructed AST where\n    introspection is not possible.  At the moment, it's only used in\n    the args attribute of FunctionDef nodes where function signature\n    introspection failed.\n    \"\"\"\n\n    name = \"Unknown\"\n\n    def qname(self):\n        return \"Unknown\"\n\n    def _infer(self, context=None, **kwargs):\n        \"\"\"Inference on an Unknown node immediately terminates.\"\"\"\n        yield util.Uninferable\n\n\nclass EvaluatedObject(NodeNG):\n    \"\"\"Contains an object that has already been inferred\n\n    This class is useful to pre-evaluate a particular node,\n    with the resulting class acting as the non-evaluated node.\n    \"\"\"\n\n    name = \"EvaluatedObject\"\n    _astroid_fields = (\"original\",)\n    _other_fields = (\"value\",)\n\n    def __init__(\n        self, original: NodeNG, value: NodeNG | type[util.Uninferable]\n    ) -> None:\n        self.original: NodeNG = original\n        \"\"\"The original node that has already been evaluated\"\"\"\n\n        self.value: NodeNG | type[util.Uninferable] = value\n        \"\"\"The inferred value\"\"\"\n\n        super().__init__(\n            lineno=self.original.lineno,\n            col_offset=self.original.col_offset,\n            parent=self.original.parent,\n        )\n\n    def _infer(\n        self, context: InferenceContext | None = None\n    ) -> Iterator[NodeNG | type[util.Uninferable]]:\n        yield self.value\n\n\n# Pattern matching #######################################################\n\n\nclass Match(Statement):\n    \"\"\"Class representing a :class:`ast.Match` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case 200:\n            ...\n        case _:\n            ...\n    ''')\n    >>> node\n    <Match l.2 at 0x10c24e170>\n    \"\"\"\n\n    _astroid_fields = (\"subject\", \"cases\")\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        self.subject: NodeNG\n        self.cases: list[MatchCase]\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        *,\n        subject: NodeNG,\n        cases: list[MatchCase],\n    ) -> None:\n        self.subject = subject\n        self.cases = cases\n\n\nclass Pattern(NodeNG):\n    \"\"\"Base class for all Pattern nodes.\"\"\"\n\n\nclass MatchCase(mixins.MultiLineBlockMixin, NodeNG):\n    \"\"\"Class representing a :class:`ast.match_case` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case 200:\n            ...\n    ''')\n    >>> node.cases[0]\n    <MatchCase l.3 at 0x10c24e590>\n    \"\"\"\n\n    _astroid_fields = (\"pattern\", \"guard\", \"body\")\n    _multi_line_block_fields = (\"body\",)\n\n    lineno: None\n    col_offset: None\n    end_lineno: None\n    end_col_offset: None\n\n    def __init__(self, *, parent: NodeNG | None = None) -> None:\n        self.pattern: Pattern\n        self.guard: NodeNG | None\n        self.body: list[NodeNG]\n        super().__init__(parent=parent)\n\n    def postinit(\n        self,\n        *,\n        pattern: Pattern,\n        guard: NodeNG | None,\n        body: list[NodeNG],\n    ) -> None:\n        self.pattern = pattern\n        self.guard = guard\n        self.body = body\n\n\nclass MatchValue(Pattern):\n    \"\"\"Class representing a :class:`ast.MatchValue` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case 200:\n            ...\n    ''')\n    >>> node.cases[0].pattern\n    <MatchValue l.3 at 0x10c24e200>\n    \"\"\"\n\n    _astroid_fields = (\"value\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        self.value: NodeNG\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, *, value: NodeNG) -> None:\n        self.value = value\n\n\nclass MatchSingleton(Pattern):\n    \"\"\"Class representing a :class:`ast.MatchSingleton` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case True:\n            ...\n        case False:\n            ...\n        case None:\n            ...\n    ''')\n    >>> node.cases[0].pattern\n    <MatchSingleton l.3 at 0x10c2282e0>\n    >>> node.cases[1].pattern\n    <MatchSingleton l.5 at 0x10c228af0>\n    >>> node.cases[2].pattern\n    <MatchSingleton l.7 at 0x10c229f90>\n    \"\"\"\n\n    _other_fields = (\"value\",)\n\n    def __init__(\n        self,\n        *,\n        value: Literal[True, False, None],\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n        parent: NodeNG | None = None,\n    ) -> None:\n        self.value = value\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n\nclass MatchSequence(Pattern):\n    \"\"\"Class representing a :class:`ast.MatchSequence` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case [1, 2]:\n            ...\n        case (1, 2, *_):\n            ...\n    ''')\n    >>> node.cases[0].pattern\n    <MatchSequence l.3 at 0x10ca80d00>\n    >>> node.cases[1].pattern\n    <MatchSequence l.5 at 0x10ca80b20>\n    \"\"\"\n\n    _astroid_fields = (\"patterns\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        self.patterns: list[Pattern]\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, *, patterns: list[Pattern]) -> None:\n        self.patterns = patterns\n\n\nclass MatchMapping(mixins.AssignTypeMixin, Pattern):\n    \"\"\"Class representing a :class:`ast.MatchMapping` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case {1: \"Hello\", 2: \"World\", 3: _, **rest}:\n            ...\n    ''')\n    >>> node.cases[0].pattern\n    <MatchMapping l.3 at 0x10c8a8850>\n    \"\"\"\n\n    _astroid_fields = (\"keys\", \"patterns\", \"rest\")\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        self.keys: list[NodeNG]\n        self.patterns: list[Pattern]\n        self.rest: AssignName | None\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        *,\n        keys: list[NodeNG],\n        patterns: list[Pattern],\n        rest: AssignName | None,\n    ) -> None:\n        self.keys = keys\n        self.patterns = patterns\n        self.rest = rest\n\n    assigned_stmts: ClassVar[\n        Callable[\n            [\n                MatchMapping,\n                AssignName,\n                InferenceContext | None,\n                None,\n            ],\n            Generator[NodeNG, None, None],\n        ]\n    ]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n\nclass MatchClass(Pattern):\n    \"\"\"Class representing a :class:`ast.MatchClass` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case Point2D(0, 0):\n            ...\n        case Point3D(x=0, y=0, z=0):\n            ...\n    ''')\n    >>> node.cases[0].pattern\n    <MatchClass l.3 at 0x10ca83940>\n    >>> node.cases[1].pattern\n    <MatchClass l.5 at 0x10ca80880>\n    \"\"\"\n\n    _astroid_fields = (\"cls\", \"patterns\", \"kwd_patterns\")\n    _other_fields = (\"kwd_attrs\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        self.cls: NodeNG\n        self.patterns: list[Pattern]\n        self.kwd_attrs: list[str]\n        self.kwd_patterns: list[Pattern]\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        *,\n        cls: NodeNG,\n        patterns: list[Pattern],\n        kwd_attrs: list[str],\n        kwd_patterns: list[Pattern],\n    ) -> None:\n        self.cls = cls\n        self.patterns = patterns\n        self.kwd_attrs = kwd_attrs\n        self.kwd_patterns = kwd_patterns\n\n\nclass MatchStar(mixins.AssignTypeMixin, Pattern):\n    \"\"\"Class representing a :class:`ast.MatchStar` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case [1, *_]:\n            ...\n    ''')\n    >>> node.cases[0].pattern.patterns[1]\n    <MatchStar l.3 at 0x10ca809a0>\n    \"\"\"\n\n    _astroid_fields = (\"name\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        self.name: AssignName | None\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, *, name: AssignName | None) -> None:\n        self.name = name\n\n    assigned_stmts: ClassVar[\n        Callable[\n            [\n                MatchStar,\n                AssignName,\n                InferenceContext | None,\n                None,\n            ],\n            Generator[NodeNG, None, None],\n        ]\n    ]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n\nclass MatchAs(mixins.AssignTypeMixin, Pattern):\n    \"\"\"Class representing a :class:`ast.MatchAs` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case [1, a]:\n            ...\n        case {'key': b}:\n            ...\n        case Point2D(0, 0) as c:\n            ...\n        case d:\n            ...\n    ''')\n    >>> node.cases[0].pattern.patterns[1]\n    <MatchAs l.3 at 0x10d0b2da0>\n    >>> node.cases[1].pattern.patterns[0]\n    <MatchAs l.5 at 0x10d0b2920>\n    >>> node.cases[2].pattern\n    <MatchAs l.7 at 0x10d0b06a0>\n    >>> node.cases[3].pattern\n    <MatchAs l.9 at 0x10d09b880>\n    \"\"\"\n\n    _astroid_fields = (\"pattern\", \"name\")\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        self.pattern: Pattern | None\n        self.name: AssignName | None\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(\n        self,\n        *,\n        pattern: Pattern | None,\n        name: AssignName | None,\n    ) -> None:\n        self.pattern = pattern\n        self.name = name\n\n    assigned_stmts: ClassVar[\n        Callable[\n            [\n                MatchAs,\n                AssignName,\n                InferenceContext | None,\n                None,\n            ],\n            Generator[NodeNG, None, None],\n        ]\n    ]\n    \"\"\"Returns the assigned statement (non inferred) according to the assignment type.\n    See astroid/protocols.py for actual implementation.\n    \"\"\"\n\n\nclass MatchOr(Pattern):\n    \"\"\"Class representing a :class:`ast.MatchOr` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case 400 | 401 | 402:\n            ...\n    ''')\n    >>> node.cases[0].pattern\n    <MatchOr l.3 at 0x10d0b0b50>\n    \"\"\"\n\n    _astroid_fields = (\"patterns\",)\n\n    def __init__(\n        self,\n        lineno: int | None = None,\n        col_offset: int | None = None,\n        parent: NodeNG | None = None,\n        *,\n        end_lineno: int | None = None,\n        end_col_offset: int | None = None,\n    ) -> None:\n        self.patterns: list[Pattern]\n        super().__init__(\n            lineno=lineno,\n            col_offset=col_offset,\n            end_lineno=end_lineno,\n            end_col_offset=end_col_offset,\n            parent=parent,\n        )\n\n    def postinit(self, *, patterns: list[Pattern]) -> None:\n        self.patterns = patterns\n\n\n# constants ##############################################################\n\nCONST_CLS = {\n    list: List,\n    tuple: Tuple,\n    dict: Dict,\n    set: Set,\n    type(None): Const,\n    type(NotImplemented): Const,\n    type(...): Const,\n}\n\n\ndef _update_const_classes():\n    \"\"\"update constant classes, so the keys of CONST_CLS can be reused\"\"\"\n    klasses = (bool, int, float, complex, str, bytes)\n    for kls in klasses:\n        CONST_CLS[kls] = Const\n\n\n_update_const_classes()\n\n\ndef _two_step_initialization(cls, value):\n    instance = cls()\n    instance.postinit(value)\n    return instance\n\n\ndef _dict_initialization(cls, value):\n    if isinstance(value, dict):\n        value = tuple(value.items())\n    return _two_step_initialization(cls, value)\n\n\n_CONST_CLS_CONSTRUCTORS = {\n    List: _two_step_initialization,\n    Tuple: _two_step_initialization,\n    Dict: _dict_initialization,\n    Set: _two_step_initialization,\n    Const: lambda cls, value: cls(value),\n}\n\n\ndef const_factory(value):\n    \"\"\"return an astroid node for a python value\"\"\"\n    # XXX we should probably be stricter here and only consider stuff in\n    # CONST_CLS or do better treatment: in case where value is not in CONST_CLS,\n    # we should rather recall the builder on this value than returning an empty\n    # node (another option being that const_factory shouldn't be called with something\n    # not in CONST_CLS)\n    assert not isinstance(value, NodeNG)\n\n    # Hack for ignoring elements of a sequence\n    # or a mapping, in order to avoid transforming\n    # each element to an AST. This is fixed in 2.0\n    # and this approach is a temporary hack.\n    if isinstance(value, (list, set, tuple, dict)):\n        elts = []\n    else:\n        elts = value\n\n    try:\n        initializer_cls = CONST_CLS[value.__class__]\n        initializer = _CONST_CLS_CONSTRUCTORS[initializer_cls]\n        return initializer(initializer_cls, elts)\n    except (KeyError, AttributeError):\n        node = EmptyNode()\n        node.object = value\n        return node\n","new_file_content":"# Copyright (c) 2009-2011, 2013-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>\n# Copyright (c) 2010 Daniel Harding <dharding@gmail.com>\n# Copyright (c) 2012 FELD Boris <lothiraldan@gmail.com>\n# Copyright (c) 2013-2014 Google, Inc.\n# Copyright (c) 2014-2021 Claudiu Popa <pcmanticore@gmail.com>\n# Copyright (c) 2014 Eevee (Alex Munroe) <amunroe@yelp.com>\n# Copyright (c) 2015-2016 Ceridwen <ceridwenv@gmail.com>\n# Copyright (c) 2015 Florian Bruhin <me@the-compiler.org>\n# Copyright (c) 2016-2017 Derek Gustafson <degustaf@gmail.com>\n# Copyright (c) 2016 Jared Garst <jgarst@users.noreply.github.com>\n# Copyright (c) 2016 Jakub Wilk <jwilk@jwilk.net>\n# Copyright (c) 2016 Dave Baum <dbaum@google.com>\n# Copyright (c) 2017-2020 Ashley Whetter <ashley@awhetter.co.uk>\n# Copyright (c) 2017, 2019 Łukasz Rogalski <rogalski.91@gmail.com>\n# Copyright (c) 2017 rr- <rr-@sakuya.pl>\n# Copyright (c) 2018, 2021 Nick Drozd <nicholasdrozd@gmail.com>\n# Copyright (c) 2018-2021 hippo91 <guillaume.peillex@gmail.com>\n# Copyright (c) 2018 Bryce Guinta <bryce.paul.guinta@gmail.com>\n# Copyright (c) 2018 Ville Skyttä <ville.skytta@iki.fi>\n# Copyright (c) 2018 brendanator <brendan.maginnis@gmail.com>\n# Copyright (c) 2018 HoverHell <hoverhell@gmail.com>\n# Copyright (c) 2019 kavins14 <kavin.singh@mail.utoronto.ca>\n# Copyright (c) 2019 kavins14 <kavinsingh@hotmail.com>\n# Copyright (c) 2020 Raphael Gaschignard <raphael@rtpg.co>\n# Copyright (c) 2020 Bryce Guinta <bryce.guinta@protonmail.com>\n# Copyright (c) 2021 Marc Mueller <30130371+cdce8p@users.noreply.github.com>\n# Copyright (c) 2021 Pierre Sassoulas <pierre.sassoulas@gmail.com>\n# Copyright (c) 2021 Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>\n# Copyright (c) 2021 David Liu <david@cs.toronto.edu>\n# Copyright (c) 2021 Alphadelta14 <alpha@alphaservcomputing.solutions>\n# Copyright (c) 2021 Andrew Haigh <hello@nelf.in>\n# Copyright (c) 2021 Federico Bond <federicobond@gmail.com>\n\n# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html\n# For details: https://github.com/PyCQA/astroid/blob/main/LICENSE\n\n\"\"\"Module for some node classes. More nodes in scoped_nodes.py\"\"\"\n\nimport abc\nimport itertools\nimport sys\nimport typing\nimport warnings\nfrom functools import lru_cache\nfrom typing import TYPE_CHECKING, Callable, Generator, Optional\n\nfrom astroid import decorators, mixins, util\nfrom astroid.bases import Instance, _infer_stmts\nfrom astroid.const import Context\nfrom astroid.context import InferenceContext\nfrom astroid.exceptions import (\n    AstroidIndexError,\n    AstroidTypeError,\n    InferenceError,\n    NoDefault,\n    ParentMissingError,\n)\nfrom astroid.manager import AstroidManager\nfrom astroid.nodes.const import OP_PRECEDENCE\nfrom astroid.nodes.node_ng import NodeNG\n\nif sys.version_info >= (3, 8):\n    from typing import Literal\nelse:\n    from typing_extensions import Literal\n\nif TYPE_CHECKING:\n    from astroid.nodes import LocalsDictNodeNG\n\n\ndef _is_const(value):\n    return isinstance(value, tuple(CONST_CLS))\n\n\n@decorators.raise_if_nothing_inferred\ndef unpack_infer(stmt, context=None):\n    \"\"\"recursively generate nodes inferred by the given statement.\n    If the inferred value is a list or a tuple, recurse on the elements\n    \"\"\"\n    if isinstance(stmt, (List, Tuple)):\n        for elt in stmt.elts:\n            if elt is util.Uninferable:\n                yield elt\n                continue\n            yield from unpack_infer(elt, context)\n        return dict(node=stmt, context=context)\n    # if inferred is a final node, return it and stop\n    inferred = next(stmt.infer(context), util.Uninferable)\n    if inferred is stmt:\n        yield inferred\n        return dict(node=stmt, context=context)\n    # else, infer recursively, except Uninferable object that should be returned as is\n    for inferred in stmt.infer(context):\n        if inferred is util.Uninferable:\n            yield inferred\n        else:\n            yield from unpack_infer(inferred, context)\n\n    return dict(node=stmt, context=context)\n\n\ndef are_exclusive(stmt1, stmt2, exceptions: Optional[typing.List[str]] = None) -> bool:\n    \"\"\"return true if the two given statements are mutually exclusive\n\n    `exceptions` may be a list of exception names. If specified, discard If\n    branches and check one of the statement is in an exception handler catching\n    one of the given exceptions.\n\n    algorithm :\n     1) index stmt1's parents\n     2) climb among stmt2's parents until we find a common parent\n     3) if the common parent is a If or TryExcept statement, look if nodes are\n        in exclusive branches\n    \"\"\"\n    # index stmt1's parents\n    stmt1_parents = {}\n    children = {}\n    previous = stmt1\n    for node in stmt1.node_ancestors():\n        stmt1_parents[node] = 1\n        children[node] = previous\n        previous = node\n    # climb among stmt2's parents until we find a common parent\n    previous = stmt2\n    for node in stmt2.node_ancestors():\n        if node in stmt1_parents:\n            # if the common parent is a If or TryExcept statement, look if\n            # nodes are in exclusive branches\n            if isinstance(node, If) and exceptions is None:\n                if (\n                    node.locate_child(previous)[1]\n                    is not node.locate_child(children[node])[1]\n                ):\n                    return True\n            elif isinstance(node, TryExcept):\n                c2attr, c2node = node.locate_child(previous)\n                c1attr, c1node = node.locate_child(children[node])\n                if c1node is not c2node:\n                    first_in_body_caught_by_handlers = (\n                        c2attr == \"handlers\"\n                        and c1attr == \"body\"\n                        and previous.catch(exceptions)\n                    )\n                    second_in_body_caught_by_handlers = (\n                        c2attr == \"body\"\n                        and c1attr == \"handlers\"\n                        and children[node].catch(exceptions)\n                    )\n                    first_in_else_other_in_handlers = (\n                        c2attr == \"handlers\" and c1attr == \"orelse\"\n                    )\n                    second_in_else_other_in_handlers = (\n                        c2attr == \"orelse\" and c1attr == \"handlers\"\n                    )\n                    if any(\n                        (\n                            first_in_body_caught_by_handlers,\n                            second_in_body_caught_by_handlers,\n                            first_in_else_other_in_handlers,\n                            second_in_else_other_in_handlers,\n                        )\n                    ):\n                        return True\n                elif c2attr == \"handlers\" and c1attr == \"handlers\":\n                    return previous is not children[node]\n            return False\n        previous = node\n    return False\n\n\n# getitem() helpers.\n\n_SLICE_SENTINEL = object()\n\n\ndef _slice_value(index, context=None):\n    \"\"\"Get the value of the given slice index.\"\"\"\n\n    if isinstance(index, Const):\n        if isinstance(index.value, (int, type(None))):\n            return index.value\n    elif index is None:\n        return None\n    else:\n        # Try to infer what the index actually is.\n        # Since we can't return all the possible values,\n        # we'll stop at the first possible value.\n        try:\n            inferred = next(index.infer(context=context))\n        except (InferenceError, StopIteration):\n            pass\n        else:\n            if isinstance(inferred, Const):\n                if isinstance(inferred.value, (int, type(None))):\n                    return inferred.value\n\n    # Use a sentinel, because None can be a valid\n    # value that this function can return,\n    # as it is the case for unspecified bounds.\n    return _SLICE_SENTINEL\n\n\ndef _infer_slice(node, context=None):\n    lower = _slice_value(node.lower, context)\n    upper = _slice_value(node.upper, context)\n    step = _slice_value(node.step, context)\n    if all(elem is not _SLICE_SENTINEL for elem in (lower, upper, step)):\n        return slice(lower, upper, step)\n\n    raise AstroidTypeError(\n        message=\"Could not infer slice used in subscript\",\n        node=node,\n        index=node.parent,\n        context=context,\n    )\n\n\ndef _container_getitem(instance, elts, index, context=None):\n    \"\"\"Get a slice or an item, using the given *index*, for the given sequence.\"\"\"\n    try:\n        if isinstance(index, Slice):\n            index_slice = _infer_slice(index, context=context)\n            new_cls = instance.__class__()\n            new_cls.elts = elts[index_slice]\n            new_cls.parent = instance.parent\n            return new_cls\n        if isinstance(index, Const):\n            return elts[index.value]\n    except IndexError as exc:\n        raise AstroidIndexError(\n            message=\"Index {index!s} out of range\",\n            node=instance,\n            index=index,\n            context=context,\n        ) from exc\n    except TypeError as exc:\n        raise AstroidTypeError(\n            message=\"Type error {error!r}\", node=instance, index=index, context=context\n        ) from exc\n\n    raise AstroidTypeError(f\"Could not use {index} as subscript index\")\n\n\nclass Statement(NodeNG):\n    \"\"\"Statement node adding a few attributes\"\"\"\n\n    is_statement = True\n    \"\"\"Whether this node indicates a statement.\"\"\"\n\n    def next_sibling(self):\n        \"\"\"The next sibling statement node.\n\n        :returns: The next sibling statement node.\n        :rtype: NodeNG or None\n        \"\"\"\n        stmts = self.parent.child_sequence(self)\n        index = stmts.index(self)\n        try:\n            return stmts[index + 1]\n        except IndexError:\n            return None\n\n    def previous_sibling(self):\n        \"\"\"The previous sibling statement.\n\n        :returns: The previous sibling statement node.\n        :rtype: NodeNG or None\n        \"\"\"\n        stmts = self.parent.child_sequence(self)\n        index = stmts.index(self)\n        if index >= 1:\n            return stmts[index - 1]\n        return None\n\n\nclass BaseContainer(\n    mixins.ParentAssignTypeMixin, NodeNG, Instance, metaclass=abc.ABCMeta\n):\n    \"\"\"Base class for Set, FrozenSet, Tuple and List.\"\"\"\n\n    _astroid_fields = (\"elts\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.elts: typing.List[NodeNG] = []\n        \"\"\"The elements in the node.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, elts: typing.List[NodeNG]) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param elts: The list of elements the that node contains.\n        \"\"\"\n        self.elts = elts\n\n    @classmethod\n    def from_elements(cls, elts=None):\n        \"\"\"Create a node of this type from the given list of elements.\n\n        :param elts: The list of elements that the node should contain.\n        :type elts: list(NodeNG)\n\n        :returns: A new node containing the given elements.\n        :rtype: NodeNG\n        \"\"\"\n        node = cls()\n        if elts is None:\n            node.elts = []\n        else:\n            node.elts = [const_factory(e) if _is_const(e) else e for e in elts]\n        return node\n\n    def itered(self):\n        \"\"\"An iterator over the elements this node contains.\n\n        :returns: The contents of this node.\n        :rtype: iterable(NodeNG)\n        \"\"\"\n        return self.elts\n\n    def bool_value(self, context=None):\n        \"\"\"Determine the boolean value of this node.\n\n        :returns: The boolean value of this node.\n        :rtype: bool or Uninferable\n        \"\"\"\n        return bool(self.elts)\n\n    @abc.abstractmethod\n    def pytype(self):\n        \"\"\"Get the name of the type that this node represents.\n\n        :returns: The name of the type.\n        :rtype: str\n        \"\"\"\n\n    def get_children(self):\n        yield from self.elts\n\n\nclass LookupMixIn:\n    \"\"\"Mixin to look up a name in the right scope.\"\"\"\n\n    @lru_cache(maxsize=None)\n    def lookup(self, name):\n        \"\"\"Lookup where the given variable is assigned.\n\n        The lookup starts from self's scope. If self is not a frame itself\n        and the name is found in the inner frame locals, statements will be\n        filtered to remove ignorable statements according to self's location.\n\n        :param name: The name of the variable to find assignments for.\n        :type name: str\n\n        :returns: The scope node and the list of assignments associated to the\n            given name according to the scope where it has been found (locals,\n            globals or builtin).\n        :rtype: tuple(str, list(NodeNG))\n        \"\"\"\n        return self.scope().scope_lookup(self, name)\n\n    def ilookup(self, name):\n        \"\"\"Lookup the inferred values of the given variable.\n\n        :param name: The variable name to find values for.\n        :type name: str\n\n        :returns: The inferred values of the statements returned from\n            :meth:`lookup`.\n        :rtype: iterable\n        \"\"\"\n        frame, stmts = self.lookup(name)\n        context = InferenceContext()\n        return _infer_stmts(stmts, context, frame)\n\n    def _get_filtered_node_statements(self, nodes):\n        statements = [(node, node.statement()) for node in nodes]\n        # Next we check if we have ExceptHandlers that are parent\n        # of the underlying variable, in which case the last one survives\n        if len(statements) > 1 and all(\n            isinstance(stmt, ExceptHandler) for _, stmt in statements\n        ):\n            statements = [\n                (node, stmt) for node, stmt in statements if stmt.parent_of(self)\n            ]\n        return statements\n\n    def _filter_stmts(self, stmts, frame, offset):\n        \"\"\"Filter the given list of statements to remove ignorable statements.\n\n        If self is not a frame itself and the name is found in the inner\n        frame locals, statements will be filtered to remove ignorable\n        statements according to self's location.\n\n        :param stmts: The statements to filter.\n        :type stmts: list(NodeNG)\n\n        :param frame: The frame that all of the given statements belong to.\n        :type frame: NodeNG\n\n        :param offset: The line offset to filter statements up to.\n        :type offset: int\n\n        :returns: The filtered statements.\n        :rtype: list(NodeNG)\n        \"\"\"\n        # if offset == -1, my actual frame is not the inner frame but its parent\n        #\n        # class A(B): pass\n        #\n        # we need this to resolve B correctly\n        if offset == -1:\n            myframe = self.frame().parent.frame()\n        else:\n            myframe = self.frame()\n            # If the frame of this node is the same as the statement\n            # of this node, then the node is part of a class or\n            # a function definition and the frame of this node should be the\n            # the upper frame, not the frame of the definition.\n            # For more information why this is important,\n            # see Pylint issue #295.\n            # For example, for 'b', the statement is the same\n            # as the frame / scope:\n            #\n            # def test(b=1):\n            #     ...\n\n            if self.statement() is myframe and myframe.parent:\n                myframe = myframe.parent.frame()\n        mystmt = self.statement()\n        # line filtering if we are in the same frame\n        #\n        # take care node may be missing lineno information (this is the case for\n        # nodes inserted for living objects)\n        if myframe is frame and mystmt.fromlineno is not None:\n            assert mystmt.fromlineno is not None, mystmt\n            mylineno = mystmt.fromlineno + offset\n        else:\n            # disabling lineno filtering\n            mylineno = 0\n\n        _stmts = []\n        _stmt_parents = []\n        statements = self._get_filtered_node_statements(stmts)\n        for node, stmt in statements:\n            # line filtering is on and we have reached our location, break\n            if stmt.fromlineno and stmt.fromlineno > mylineno > 0:\n                break\n            # Ignore decorators with the same name as the\n            # decorated function\n            # Fixes issue #375\n            if mystmt is stmt and is_from_decorator(self):\n                continue\n            assert hasattr(node, \"assign_type\"), (\n                node,\n                node.scope(),\n                node.scope().locals,\n            )\n            assign_type = node.assign_type()\n            if node.has_base(self):\n                break\n\n            _stmts, done = assign_type._get_filtered_stmts(self, node, _stmts, mystmt)\n            if done:\n                break\n\n            optional_assign = assign_type.optional_assign\n            if optional_assign and assign_type.parent_of(self):\n                # we are inside a loop, loop var assignment is hiding previous\n                # assignment\n                _stmts = [node]\n                _stmt_parents = [stmt.parent]\n                continue\n\n            if isinstance(assign_type, NamedExpr):\n                # If the NamedExpr is in an if statement we do some basic control flow inference\n                if_parent = _get_if_statement_ancestor(assign_type)\n                if if_parent:\n                    # If the if statement is within another if statement we append the node\n                    # to possible statements\n                    if _get_if_statement_ancestor(if_parent):\n                        optional_assign = False\n                        _stmts.append(node)\n                        _stmt_parents.append(stmt.parent)\n                    # If the if statement is first-level and not within an orelse block\n                    # we know that it will be evaluated\n                    elif not if_parent.is_orelse:\n                        _stmts = [node]\n                        _stmt_parents = [stmt.parent]\n                    # Else we do not known enough about the control flow to be 100% certain\n                    # and we append to possible statements\n                    else:\n                        _stmts.append(node)\n                        _stmt_parents.append(stmt.parent)\n                else:\n                    _stmts = [node]\n                    _stmt_parents = [stmt.parent]\n\n            # XXX comment various branches below!!!\n            try:\n                pindex = _stmt_parents.index(stmt.parent)\n            except ValueError:\n                pass\n            else:\n                # we got a parent index, this means the currently visited node\n                # is at the same block level as a previously visited node\n                if _stmts[pindex].assign_type().parent_of(assign_type):\n                    # both statements are not at the same block level\n                    continue\n                # if currently visited node is following previously considered\n                # assignment and both are not exclusive, we can drop the\n                # previous one. For instance in the following code ::\n                #\n                #   if a:\n                #     x = 1\n                #   else:\n                #     x = 2\n                #   print x\n                #\n                # we can't remove neither x = 1 nor x = 2 when looking for 'x'\n                # of 'print x'; while in the following ::\n                #\n                #   x = 1\n                #   x = 2\n                #   print x\n                #\n                # we can remove x = 1 when we see x = 2\n                #\n                # moreover, on loop assignment types, assignment won't\n                # necessarily be done if the loop has no iteration, so we don't\n                # want to clear previous assignments if any (hence the test on\n                # optional_assign)\n                if not (optional_assign or are_exclusive(_stmts[pindex], node)):\n                    del _stmt_parents[pindex]\n                    del _stmts[pindex]\n\n            # If self and node are exclusive, then we can ignore node\n            if are_exclusive(self, node):\n                continue\n\n            # An AssignName node overrides previous assignments if:\n            #   1. node's statement always assigns\n            #   2. node and self are in the same block (i.e., has the same parent as self)\n            if isinstance(node, (NamedExpr, AssignName)):\n                if isinstance(stmt, ExceptHandler):\n                    # If node's statement is an ExceptHandler, then it is the variable\n                    # bound to the caught exception. If self is not contained within\n                    # the exception handler block, node should override previous assignments;\n                    # otherwise, node should be ignored, as an exception variable\n                    # is local to the handler block.\n                    if stmt.parent_of(self):\n                        _stmts = []\n                        _stmt_parents = []\n                    else:\n                        continue\n                elif not optional_assign and stmt.parent is mystmt.parent:\n                    _stmts = []\n                    _stmt_parents = []\n            elif isinstance(node, DelName):\n                # Remove all previously stored assignments\n                _stmts = []\n                _stmt_parents = []\n                continue\n            # Add the new assignment\n            _stmts.append(node)\n            if isinstance(node, Arguments) or isinstance(node.parent, Arguments):\n                # Special case for _stmt_parents when node is a function parameter;\n                # in this case, stmt is the enclosing FunctionDef, which is what we\n                # want to add to _stmt_parents, not stmt.parent. This case occurs when\n                # node is an Arguments node (representing varargs or kwargs parameter),\n                # and when node.parent is an Arguments node (other parameters).\n                # See issue #180.\n                _stmt_parents.append(stmt)\n            else:\n                _stmt_parents.append(stmt.parent)\n        return _stmts\n\n\n# Name classes\n\n\nclass AssignName(\n    mixins.NoChildrenMixin, LookupMixIn, mixins.ParentAssignTypeMixin, NodeNG\n):\n    \"\"\"Variation of :class:`ast.Assign` representing assignment to a name.\n\n    An :class:`AssignName` is the name of something that is assigned to.\n    This includes variables defined in a function signature or in a loop.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('variable = range(10)')\n    >>> node\n    <Assign l.1 at 0x7effe1db8550>\n    >>> list(node.get_children())\n    [<AssignName.variable l.1 at 0x7effe1db8748>, <Call l.1 at 0x7effe1db8630>]\n    >>> list(node.get_children())[0].as_string()\n    'variable'\n    \"\"\"\n\n    _other_fields = (\"name\",)\n\n    @decorators.deprecate_default_argument_values(name=\"str\")\n    def __init__(\n        self,\n        name: Optional[str] = None,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param name: The name that is assigned to.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.name: Optional[str] = name\n        \"\"\"The name that is assigned to.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n\nclass DelName(\n    mixins.NoChildrenMixin, LookupMixIn, mixins.ParentAssignTypeMixin, NodeNG\n):\n    \"\"\"Variation of :class:`ast.Delete` representing deletion of a name.\n\n    A :class:`DelName` is the name of something that is deleted.\n\n    >>> import astroid\n    >>> node = astroid.extract_node(\"del variable #@\")\n    >>> list(node.get_children())\n    [<DelName.variable l.1 at 0x7effe1da4d30>]\n    >>> list(node.get_children())[0].as_string()\n    'variable'\n    \"\"\"\n\n    _other_fields = (\"name\",)\n\n    @decorators.deprecate_default_argument_values(name=\"str\")\n    def __init__(\n        self,\n        name: Optional[str] = None,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param name: The name that is being deleted.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.name: Optional[str] = name\n        \"\"\"The name that is being deleted.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n\nclass Name(mixins.NoChildrenMixin, LookupMixIn, NodeNG):\n    \"\"\"Class representing an :class:`ast.Name` node.\n\n    A :class:`Name` node is something that is named, but not covered by\n    :class:`AssignName` or :class:`DelName`.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('range(10)')\n    >>> node\n    <Call l.1 at 0x7effe1db8710>\n    >>> list(node.get_children())\n    [<Name.range l.1 at 0x7effe1db86a0>, <Const.int l.1 at 0x7effe1db8518>]\n    >>> list(node.get_children())[0].as_string()\n    'range'\n    \"\"\"\n\n    _other_fields = (\"name\",)\n\n    @decorators.deprecate_default_argument_values(name=\"str\")\n    def __init__(\n        self,\n        name: Optional[str] = None,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param name: The name that this node refers to.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.name: Optional[str] = name\n        \"\"\"The name that this node refers to.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def _get_name_nodes(self):\n        yield self\n\n        for child_node in self.get_children():\n            yield from child_node._get_name_nodes()\n\n\nclass Arguments(mixins.AssignTypeMixin, NodeNG):\n    \"\"\"Class representing an :class:`ast.arguments` node.\n\n    An :class:`Arguments` node represents that arguments in a\n    function definition.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('def foo(bar): pass')\n    >>> node\n    <FunctionDef.foo l.1 at 0x7effe1db8198>\n    >>> node.args\n    <Arguments l.1 at 0x7effe1db82e8>\n    \"\"\"\n\n    # Python 3.4+ uses a different approach regarding annotations,\n    # each argument is a new class, _ast.arg, which exposes an\n    # 'annotation' attribute. In astroid though, arguments are exposed\n    # as is in the Arguments node and the only way to expose annotations\n    # is by using something similar with Python 3.3:\n    #  - we expose 'varargannotation' and 'kwargannotation' of annotations\n    #    of varargs and kwargs.\n    #  - we expose 'annotation', a list with annotations for\n    #    for each normal argument. If an argument doesn't have an\n    #    annotation, its value will be None.\n    _astroid_fields = (\n        \"args\",\n        \"defaults\",\n        \"kwonlyargs\",\n        \"posonlyargs\",\n        \"posonlyargs_annotations\",\n        \"kw_defaults\",\n        \"annotations\",\n        \"varargannotation\",\n        \"kwargannotation\",\n        \"kwonlyargs_annotations\",\n        \"type_comment_args\",\n        \"type_comment_kwonlyargs\",\n        \"type_comment_posonlyargs\",\n    )\n\n    _other_fields = (\"vararg\", \"kwarg\")\n\n    lineno: None\n    col_offset: None\n\n    def __init__(\n        self,\n        vararg: Optional[str] = None,\n        kwarg: Optional[str] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param vararg: The name of the variable length arguments.\n\n        :param kwarg: The name of the variable length keyword arguments.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        super().__init__(parent=parent)\n\n        self.vararg: Optional[str] = vararg  # can be None\n        \"\"\"The name of the variable length arguments.\"\"\"\n\n        self.kwarg: Optional[str] = kwarg  # can be None\n        \"\"\"The name of the variable length keyword arguments.\"\"\"\n\n        self.args: typing.List[AssignName]\n        \"\"\"The names of the required arguments.\"\"\"\n\n        self.defaults: typing.List[NodeNG]\n        \"\"\"The default values for arguments that can be passed positionally.\"\"\"\n\n        self.kwonlyargs: typing.List[AssignName]\n        \"\"\"The keyword arguments that cannot be passed positionally.\"\"\"\n\n        self.posonlyargs: typing.List[AssignName] = []\n        \"\"\"The arguments that can only be passed positionally.\"\"\"\n\n        self.kw_defaults: typing.List[Optional[NodeNG]]\n        \"\"\"The default values for keyword arguments that cannot be passed positionally.\"\"\"\n\n        self.annotations: typing.List[Optional[NodeNG]]\n        \"\"\"The type annotations of arguments that can be passed positionally.\"\"\"\n\n        self.posonlyargs_annotations: typing.List[Optional[NodeNG]] = []\n        \"\"\"The type annotations of arguments that can only be passed positionally.\"\"\"\n\n        self.kwonlyargs_annotations: typing.List[Optional[NodeNG]] = []\n        \"\"\"The type annotations of arguments that cannot be passed positionally.\"\"\"\n\n        self.type_comment_args: typing.List[Optional[NodeNG]] = []\n        \"\"\"The type annotation, passed by a type comment, of each argument.\n\n        If an argument does not have a type comment,\n        the value for that argument will be None.\n        \"\"\"\n\n        self.type_comment_kwonlyargs: typing.List[Optional[NodeNG]] = []\n        \"\"\"The type annotation, passed by a type comment, of each keyword only argument.\n\n        If an argument does not have a type comment,\n        the value for that argument will be None.\n        \"\"\"\n\n        self.type_comment_posonlyargs: typing.List[Optional[NodeNG]] = []\n        \"\"\"The type annotation, passed by a type comment, of each positional argument.\n\n        If an argument does not have a type comment,\n        the value for that argument will be None.\n        \"\"\"\n\n        self.varargannotation: Optional[NodeNG] = None  # can be None\n        \"\"\"The type annotation for the variable length arguments.\"\"\"\n\n        self.kwargannotation: Optional[NodeNG] = None  # can be None\n        \"\"\"The type annotation for the variable length keyword arguments.\"\"\"\n\n    # pylint: disable=too-many-arguments\n    def postinit(\n        self,\n        args: typing.List[AssignName],\n        defaults: typing.List[NodeNG],\n        kwonlyargs: typing.List[AssignName],\n        kw_defaults: typing.List[Optional[NodeNG]],\n        annotations: typing.List[Optional[NodeNG]],\n        posonlyargs: Optional[typing.List[AssignName]] = None,\n        kwonlyargs_annotations: Optional[typing.List[Optional[NodeNG]]] = None,\n        posonlyargs_annotations: Optional[typing.List[Optional[NodeNG]]] = None,\n        varargannotation: Optional[NodeNG] = None,\n        kwargannotation: Optional[NodeNG] = None,\n        type_comment_args: Optional[typing.List[Optional[NodeNG]]] = None,\n        type_comment_kwonlyargs: Optional[typing.List[Optional[NodeNG]]] = None,\n        type_comment_posonlyargs: Optional[typing.List[Optional[NodeNG]]] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param args: The names of the required arguments.\n\n        :param defaults: The default values for arguments that can be passed\n            positionally.\n\n        :param kwonlyargs: The keyword arguments that cannot be passed\n            positionally.\n\n        :param posonlyargs: The arguments that can only be passed\n            positionally.\n\n        :param kw_defaults: The default values for keyword arguments that\n            cannot be passed positionally.\n\n        :param annotations: The type annotations of arguments that can be\n            passed positionally.\n\n        :param kwonlyargs_annotations: The type annotations of arguments that\n            cannot be passed positionally. This should always be passed in\n            Python 3.\n\n        :param posonlyargs_annotations: The type annotations of arguments that\n            can only be passed positionally. This should always be passed in\n            Python 3.\n\n        :param varargannotation: The type annotation for the variable length\n            arguments.\n\n        :param kwargannotation: The type annotation for the variable length\n            keyword arguments.\n\n        :param type_comment_args: The type annotation,\n            passed by a type comment, of each argument.\n\n        :param type_comment_args: The type annotation,\n            passed by a type comment, of each keyword only argument.\n\n        :param type_comment_args: The type annotation,\n            passed by a type comment, of each positional argument.\n        \"\"\"\n        self.args = args\n        self.defaults = defaults\n        self.kwonlyargs = kwonlyargs\n        if posonlyargs is not None:\n            self.posonlyargs = posonlyargs\n        self.kw_defaults = kw_defaults\n        self.annotations = annotations\n        if kwonlyargs_annotations is not None:\n            self.kwonlyargs_annotations = kwonlyargs_annotations\n        if posonlyargs_annotations is not None:\n            self.posonlyargs_annotations = posonlyargs_annotations\n        self.varargannotation = varargannotation\n        self.kwargannotation = kwargannotation\n        if type_comment_args is not None:\n            self.type_comment_args = type_comment_args\n        if type_comment_kwonlyargs is not None:\n            self.type_comment_kwonlyargs = type_comment_kwonlyargs\n        if type_comment_posonlyargs is not None:\n            self.type_comment_posonlyargs = type_comment_posonlyargs\n\n    def _infer_name(self, frame, name):\n        if self.parent is frame:\n            return name\n        return None\n\n    @decorators.cachedproperty\n    def fromlineno(self):\n        \"\"\"The first line that this node appears on in the source code.\n\n        :type: int or None\n        \"\"\"\n        lineno = super().fromlineno\n        return max(lineno, self.parent.fromlineno or 0)\n\n    @decorators.cachedproperty\n    def arguments(self):\n        \"\"\"Get all the arguments for this node, including positional only and positional and keyword\"\"\"\n        return list(itertools.chain((self.posonlyargs or ()), self.args or ()))\n\n    def format_args(self):\n        \"\"\"Get the arguments formatted as string.\n\n        :returns: The formatted arguments.\n        :rtype: str\n        \"\"\"\n        result = []\n        positional_only_defaults = []\n        positional_or_keyword_defaults = self.defaults\n        if self.defaults:\n            args = self.args or []\n            positional_or_keyword_defaults = self.defaults[-len(args) :]\n            positional_only_defaults = self.defaults[: len(self.defaults) - len(args)]\n\n        if self.posonlyargs:\n            result.append(\n                _format_args(\n                    self.posonlyargs,\n                    positional_only_defaults,\n                    self.posonlyargs_annotations,\n                )\n            )\n            result.append(\"/\")\n        if self.args:\n            result.append(\n                _format_args(\n                    self.args,\n                    positional_or_keyword_defaults,\n                    getattr(self, \"annotations\", None),\n                )\n            )\n        if self.vararg:\n            result.append(f\"*{self.vararg}\")\n        if self.kwonlyargs:\n            if not self.vararg:\n                result.append(\"*\")\n            result.append(\n                _format_args(\n                    self.kwonlyargs, self.kw_defaults, self.kwonlyargs_annotations\n                )\n            )\n        if self.kwarg:\n            result.append(f\"**{self.kwarg}\")\n        return \", \".join(result)\n\n    def default_value(self, argname):\n        \"\"\"Get the default value for an argument.\n\n        :param argname: The name of the argument to get the default value for.\n        :type argname: str\n\n        :raises NoDefault: If there is no default value defined for the\n            given argument.\n        \"\"\"\n        args = self.arguments\n        index = _find_arg(argname, args)[0]\n        if index is not None:\n            idx = index - (len(args) - len(self.defaults))\n            if idx >= 0:\n                return self.defaults[idx]\n        index = _find_arg(argname, self.kwonlyargs)[0]\n        if index is not None and self.kw_defaults[index] is not None:\n            return self.kw_defaults[index]\n        raise NoDefault(func=self.parent, name=argname)\n\n    def is_argument(self, name):\n        \"\"\"Check if the given name is defined in the arguments.\n\n        :param name: The name to check for.\n        :type name: str\n\n        :returns: True if the given name is defined in the arguments,\n            False otherwise.\n        :rtype: bool\n        \"\"\"\n        if name == self.vararg:\n            return True\n        if name == self.kwarg:\n            return True\n        return (\n            self.find_argname(name, rec=True)[1] is not None\n            or self.kwonlyargs\n            and _find_arg(name, self.kwonlyargs, rec=True)[1] is not None\n        )\n\n    def find_argname(self, argname, rec=False):\n        \"\"\"Get the index and :class:`AssignName` node for given name.\n\n        :param argname: The name of the argument to search for.\n        :type argname: str\n\n        :param rec: Whether or not to include arguments in unpacked tuples\n            in the search.\n        :type rec: bool\n\n        :returns: The index and node for the argument.\n        :rtype: tuple(str or None, AssignName or None)\n        \"\"\"\n        if self.arguments:\n            return _find_arg(argname, self.arguments, rec)\n        return None, None\n\n    def get_children(self):\n        yield from self.posonlyargs or ()\n\n        for elt in self.posonlyargs_annotations:\n            if elt is not None:\n                yield elt\n\n        yield from self.args or ()\n\n        yield from self.defaults\n        yield from self.kwonlyargs\n\n        for elt in self.kw_defaults:\n            if elt is not None:\n                yield elt\n\n        for elt in self.annotations:\n            if elt is not None:\n                yield elt\n\n        if self.varargannotation is not None:\n            yield self.varargannotation\n\n        if self.kwargannotation is not None:\n            yield self.kwargannotation\n\n        for elt in self.kwonlyargs_annotations:\n            if elt is not None:\n                yield elt\n\n\ndef _find_arg(argname, args, rec=False):\n    for i, arg in enumerate(args):\n        if isinstance(arg, Tuple):\n            if rec:\n                found = _find_arg(argname, arg.elts)\n                if found[0] is not None:\n                    return found\n        elif arg.name == argname:\n            return i, arg\n    return None, None\n\n\ndef _format_args(args, defaults=None, annotations=None):\n    values = []\n    if args is None:\n        return \"\"\n    if annotations is None:\n        annotations = []\n    if defaults is not None:\n        default_offset = len(args) - len(defaults)\n    packed = itertools.zip_longest(args, annotations)\n    for i, (arg, annotation) in enumerate(packed):\n        if isinstance(arg, Tuple):\n            values.append(f\"({_format_args(arg.elts)})\")\n        else:\n            argname = arg.name\n            default_sep = \"=\"\n            if annotation is not None:\n                argname += \": \" + annotation.as_string()\n                default_sep = \" = \"\n            values.append(argname)\n\n            if defaults is not None and i >= default_offset:\n                if defaults[i - default_offset] is not None:\n                    values[-1] += default_sep + defaults[i - default_offset].as_string()\n    return \", \".join(values)\n\n\nclass AssignAttr(mixins.ParentAssignTypeMixin, NodeNG):\n    \"\"\"Variation of :class:`ast.Assign` representing assignment to an attribute.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('self.attribute = range(10)')\n    >>> node\n    <Assign l.1 at 0x7effe1d521d0>\n    >>> list(node.get_children())\n    [<AssignAttr.attribute l.1 at 0x7effe1d52320>, <Call l.1 at 0x7effe1d522e8>]\n    >>> list(node.get_children())[0].as_string()\n    'self.attribute'\n    \"\"\"\n\n    _astroid_fields = (\"expr\",)\n    _other_fields = (\"attrname\",)\n\n    @decorators.deprecate_default_argument_values(attrname=\"str\")\n    def __init__(\n        self,\n        attrname: Optional[str] = None,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param attrname: The name of the attribute being assigned to.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.expr: Optional[NodeNG] = None\n        \"\"\"What has the attribute that is being assigned to.\"\"\"\n\n        self.attrname: Optional[str] = attrname\n        \"\"\"The name of the attribute being assigned to.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, expr: Optional[NodeNG] = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param expr: What has the attribute that is being assigned to.\n        \"\"\"\n        self.expr = expr\n\n    def get_children(self):\n        yield self.expr\n\n\nclass Assert(Statement):\n    \"\"\"Class representing an :class:`ast.Assert` node.\n\n    An :class:`Assert` node represents an assert statement.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('assert len(things) == 10, \"Not enough things\"')\n    >>> node\n    <Assert l.1 at 0x7effe1d527b8>\n    \"\"\"\n\n    _astroid_fields = (\"test\", \"fail\")\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.test: Optional[NodeNG] = None\n        \"\"\"The test that passes or fails the assertion.\"\"\"\n\n        self.fail: Optional[NodeNG] = None  # can be None\n        \"\"\"The message shown when the assertion fails.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self, test: Optional[NodeNG] = None, fail: Optional[NodeNG] = None\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param test: The test that passes or fails the assertion.\n\n        :param fail: The message shown when the assertion fails.\n        \"\"\"\n        self.fail = fail\n        self.test = test\n\n    def get_children(self):\n        yield self.test\n\n        if self.fail is not None:\n            yield self.fail\n\n\nclass Assign(mixins.AssignTypeMixin, Statement):\n    \"\"\"Class representing an :class:`ast.Assign` node.\n\n    An :class:`Assign` is a statement where something is explicitly\n    asssigned to.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('variable = range(10)')\n    >>> node\n    <Assign l.1 at 0x7effe1db8550>\n    \"\"\"\n\n    _astroid_fields = (\"targets\", \"value\")\n    _other_other_fields = (\"type_annotation\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.targets: typing.List[NodeNG] = []\n        \"\"\"What is being assigned to.\"\"\"\n\n        self.value: Optional[NodeNG] = None\n        \"\"\"The value being assigned to the variables.\"\"\"\n\n        self.type_annotation: Optional[NodeNG] = None  # can be None\n        \"\"\"If present, this will contain the type annotation passed by a type comment\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        targets: Optional[typing.List[NodeNG]] = None,\n        value: Optional[NodeNG] = None,\n        type_annotation: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param targets: What is being assigned to.\n        :param value: The value being assigned to the variables.\n        :param type_annotation:\n        \"\"\"\n        if targets is not None:\n            self.targets = targets\n        self.value = value\n        self.type_annotation = type_annotation\n\n    def get_children(self):\n        yield from self.targets\n\n        yield self.value\n\n    @decorators.cached\n    def _get_assign_nodes(self):\n        return [self] + list(self.value._get_assign_nodes())\n\n    def _get_yield_nodes_skip_lambdas(self):\n        yield from self.value._get_yield_nodes_skip_lambdas()\n\n\nclass AnnAssign(mixins.AssignTypeMixin, Statement):\n    \"\"\"Class representing an :class:`ast.AnnAssign` node.\n\n    An :class:`AnnAssign` is an assignment with a type annotation.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('variable: List[int] = range(10)')\n    >>> node\n    <AnnAssign l.1 at 0x7effe1d4c630>\n    \"\"\"\n\n    _astroid_fields = (\"target\", \"annotation\", \"value\")\n    _other_fields = (\"simple\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.target: Optional[NodeNG] = None\n        \"\"\"What is being assigned to.\"\"\"\n\n        self.annotation: Optional[NodeNG] = None\n        \"\"\"The type annotation of what is being assigned to.\"\"\"\n\n        self.value: Optional[NodeNG] = None  # can be None\n        \"\"\"The value being assigned to the variables.\"\"\"\n\n        self.simple: Optional[int] = None\n        \"\"\"Whether :attr:`target` is a pure name or a complex statement.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        target: NodeNG,\n        annotation: NodeNG,\n        simple: int,\n        value: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param target: What is being assigned to.\n\n        :param annotation: The type annotation of what is being assigned to.\n\n        :param simple: Whether :attr:`target` is a pure name\n            or a complex statement.\n\n        :param value: The value being assigned to the variables.\n        \"\"\"\n        self.target = target\n        self.annotation = annotation\n        self.value = value\n        self.simple = simple\n\n    def get_children(self):\n        yield self.target\n        yield self.annotation\n\n        if self.value is not None:\n            yield self.value\n\n\nclass AugAssign(mixins.AssignTypeMixin, Statement):\n    \"\"\"Class representing an :class:`ast.AugAssign` node.\n\n    An :class:`AugAssign` is an assignment paired with an operator.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('variable += 1')\n    >>> node\n    <AugAssign l.1 at 0x7effe1db4d68>\n    \"\"\"\n\n    _astroid_fields = (\"target\", \"value\")\n    _other_fields = (\"op\",)\n\n    @decorators.deprecate_default_argument_values(op=\"str\")\n    def __init__(\n        self,\n        op: Optional[str] = None,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param op: The operator that is being combined with the assignment.\n            This includes the equals sign.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.target: Optional[NodeNG] = None\n        \"\"\"What is being assigned to.\"\"\"\n\n        self.op: Optional[str] = op\n        \"\"\"The operator that is being combined with the assignment.\n\n        This includes the equals sign.\n        \"\"\"\n\n        self.value: Optional[NodeNG] = None\n        \"\"\"The value being assigned to the variable.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self, target: Optional[NodeNG] = None, value: Optional[NodeNG] = None\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param target: What is being assigned to.\n\n        :param value: The value being assigned to the variable.\n        \"\"\"\n        self.target = target\n        self.value = value\n\n    # This is set by inference.py\n    def _infer_augassign(self, context=None):\n        raise NotImplementedError\n\n    def type_errors(self, context=None):\n        \"\"\"Get a list of type errors which can occur during inference.\n\n        Each TypeError is represented by a :class:`BadBinaryOperationMessage` ,\n        which holds the original exception.\n\n        :returns: The list of possible type errors.\n        :rtype: list(BadBinaryOperationMessage)\n        \"\"\"\n        try:\n            results = self._infer_augassign(context=context)\n            return [\n                result\n                for result in results\n                if isinstance(result, util.BadBinaryOperationMessage)\n            ]\n        except InferenceError:\n            return []\n\n    def get_children(self):\n        yield self.target\n        yield self.value\n\n    def _get_yield_nodes_skip_lambdas(self):\n        \"\"\"An AugAssign node can contain a Yield node in the value\"\"\"\n        yield from self.value._get_yield_nodes_skip_lambdas()\n        yield from super()._get_yield_nodes_skip_lambdas()\n\n\nclass BinOp(NodeNG):\n    \"\"\"Class representing an :class:`ast.BinOp` node.\n\n    A :class:`BinOp` node is an application of a binary operator.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('a + b')\n    >>> node\n    <BinOp l.1 at 0x7f23b2e8cfd0>\n    \"\"\"\n\n    _astroid_fields = (\"left\", \"right\")\n    _other_fields = (\"op\",)\n\n    @decorators.deprecate_default_argument_values(op=\"str\")\n    def __init__(\n        self,\n        op: Optional[str] = None,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param op: The operator.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.left: Optional[NodeNG] = None\n        \"\"\"What is being applied to the operator on the left side.\"\"\"\n\n        self.op: Optional[str] = op\n        \"\"\"The operator.\"\"\"\n\n        self.right: Optional[NodeNG] = None\n        \"\"\"What is being applied to the operator on the right side.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self, left: Optional[NodeNG] = None, right: Optional[NodeNG] = None\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param left: What is being applied to the operator on the left side.\n\n        :param right: What is being applied to the operator on the right side.\n        \"\"\"\n        self.left = left\n        self.right = right\n\n    # This is set by inference.py\n    def _infer_binop(self, context=None):\n        raise NotImplementedError\n\n    def type_errors(self, context=None):\n        \"\"\"Get a list of type errors which can occur during inference.\n\n        Each TypeError is represented by a :class:`BadBinaryOperationMessage`,\n        which holds the original exception.\n\n        :returns: The list of possible type errors.\n        :rtype: list(BadBinaryOperationMessage)\n        \"\"\"\n        try:\n            results = self._infer_binop(context=context)\n            return [\n                result\n                for result in results\n                if isinstance(result, util.BadBinaryOperationMessage)\n            ]\n        except InferenceError:\n            return []\n\n    def get_children(self):\n        yield self.left\n        yield self.right\n\n    def op_precedence(self):\n        return OP_PRECEDENCE[self.op]\n\n    def op_left_associative(self):\n        # 2**3**4 == 2**(3**4)\n        return self.op != \"**\"\n\n\nclass BoolOp(NodeNG):\n    \"\"\"Class representing an :class:`ast.BoolOp` node.\n\n    A :class:`BoolOp` is an application of a boolean operator.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('a and b')\n    >>> node\n    <BinOp l.1 at 0x7f23b2e71c50>\n    \"\"\"\n\n    _astroid_fields = (\"values\",)\n    _other_fields = (\"op\",)\n\n    @decorators.deprecate_default_argument_values(op=\"str\")\n    def __init__(\n        self,\n        op: Optional[str] = None,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param op: The operator.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.op: Optional[str] = op\n        \"\"\"The operator.\"\"\"\n\n        self.values: typing.List[NodeNG] = []\n        \"\"\"The values being applied to the operator.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, values: Optional[typing.List[NodeNG]] = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param values: The values being applied to the operator.\n        \"\"\"\n        if values is not None:\n            self.values = values\n\n    def get_children(self):\n        yield from self.values\n\n    def op_precedence(self):\n        return OP_PRECEDENCE[self.op]\n\n\nclass Break(mixins.NoChildrenMixin, Statement):\n    \"\"\"Class representing an :class:`ast.Break` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('break')\n    >>> node\n    <Break l.1 at 0x7f23b2e9e5c0>\n    \"\"\"\n\n\nclass Call(NodeNG):\n    \"\"\"Class representing an :class:`ast.Call` node.\n\n    A :class:`Call` node is a call to a function, method, etc.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('function()')\n    >>> node\n    <Call l.1 at 0x7f23b2e71eb8>\n    \"\"\"\n\n    _astroid_fields = (\"func\", \"args\", \"keywords\")\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.func: Optional[NodeNG] = None\n        \"\"\"What is being called.\"\"\"\n\n        self.args: typing.List[NodeNG] = []\n        \"\"\"The positional arguments being given to the call.\"\"\"\n\n        self.keywords: typing.List[\"Keyword\"] = []\n        \"\"\"The keyword arguments being given to the call.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        func: Optional[NodeNG] = None,\n        args: Optional[typing.List[NodeNG]] = None,\n        keywords: Optional[typing.List[\"Keyword\"]] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param func: What is being called.\n\n        :param args: The positional arguments being given to the call.\n\n        :param keywords: The keyword arguments being given to the call.\n        \"\"\"\n        self.func = func\n        if args is not None:\n            self.args = args\n        if keywords is not None:\n            self.keywords = keywords\n\n    @property\n    def starargs(self) -> typing.List[\"Starred\"]:\n        \"\"\"The positional arguments that unpack something.\"\"\"\n        return [arg for arg in self.args if isinstance(arg, Starred)]\n\n    @property\n    def kwargs(self) -> typing.List[\"Keyword\"]:\n        \"\"\"The keyword arguments that unpack something.\"\"\"\n        return [keyword for keyword in self.keywords if keyword.arg is None]\n\n    def get_children(self):\n        yield self.func\n\n        yield from self.args\n\n        yield from self.keywords\n\n\nclass Compare(NodeNG):\n    \"\"\"Class representing an :class:`ast.Compare` node.\n\n    A :class:`Compare` node indicates a comparison.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('a <= b <= c')\n    >>> node\n    <Compare l.1 at 0x7f23b2e9e6d8>\n    >>> node.ops\n    [('<=', <Name.b l.1 at 0x7f23b2e9e2b0>), ('<=', <Name.c l.1 at 0x7f23b2e9e390>)]\n    \"\"\"\n\n    _astroid_fields = (\"left\", \"ops\")\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.left: Optional[NodeNG] = None\n        \"\"\"The value at the left being applied to a comparison operator.\"\"\"\n\n        self.ops: typing.List[typing.Tuple[str, NodeNG]] = []\n        \"\"\"The remainder of the operators and their relevant right hand value.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        left: Optional[NodeNG] = None,\n        ops: Optional[typing.List[typing.Tuple[str, NodeNG]]] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param left: The value at the left being applied to a comparison\n            operator.\n\n        :param ops: The remainder of the operators\n            and their relevant right hand value.\n        \"\"\"\n        self.left = left\n        if ops is not None:\n            self.ops = ops\n\n    def get_children(self):\n        \"\"\"Get the child nodes below this node.\n\n        Overridden to handle the tuple fields and skip returning the operator\n        strings.\n\n        :returns: The children.\n        :rtype: iterable(NodeNG)\n        \"\"\"\n        yield self.left\n        for _, comparator in self.ops:\n            yield comparator  # we don't want the 'op'\n\n    def last_child(self):\n        \"\"\"An optimized version of list(get_children())[-1]\n\n        :returns: The last child.\n        :rtype: NodeNG\n        \"\"\"\n        # XXX maybe if self.ops:\n        return self.ops[-1][1]\n        # return self.left\n\n\nclass Comprehension(NodeNG):\n    \"\"\"Class representing an :class:`ast.comprehension` node.\n\n    A :class:`Comprehension` indicates the loop inside any type of\n    comprehension including generator expressions.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('[x for x in some_values]')\n    >>> list(node.get_children())\n    [<Name.x l.1 at 0x7f23b2e352b0>, <Comprehension l.1 at 0x7f23b2e35320>]\n    >>> list(node.get_children())[1].as_string()\n    'for x in some_values'\n    \"\"\"\n\n    _astroid_fields = (\"target\", \"iter\", \"ifs\")\n    _other_fields = (\"is_async\",)\n\n    optional_assign = True\n    \"\"\"Whether this node optionally assigns a variable.\"\"\"\n\n    lineno: None\n    col_offset: None\n\n    def __init__(self, parent: Optional[NodeNG] = None) -> None:\n        \"\"\"\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.target: Optional[NodeNG] = None\n        \"\"\"What is assigned to by the comprehension.\"\"\"\n\n        self.iter: Optional[NodeNG] = None\n        \"\"\"What is iterated over by the comprehension.\"\"\"\n\n        self.ifs: typing.List[NodeNG] = []\n        \"\"\"The contents of any if statements that filter the comprehension.\"\"\"\n\n        self.is_async: Optional[bool] = None\n        \"\"\"Whether this is an asynchronous comprehension or not.\"\"\"\n\n        super().__init__(parent=parent)\n\n    # pylint: disable=redefined-builtin; same name as builtin ast module.\n    def postinit(\n        self,\n        target: Optional[NodeNG] = None,\n        iter: Optional[NodeNG] = None,\n        ifs: Optional[typing.List[NodeNG]] = None,\n        is_async: Optional[bool] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param target: What is assigned to by the comprehension.\n\n        :param iter: What is iterated over by the comprehension.\n\n        :param ifs: The contents of any if statements that filter\n            the comprehension.\n\n        :param is_async: Whether this is an asynchronous comprehension or not.\n        \"\"\"\n        self.target = target\n        self.iter = iter\n        if ifs is not None:\n            self.ifs = ifs\n        self.is_async = is_async\n\n    def assign_type(self):\n        \"\"\"The type of assignment that this node performs.\n\n        :returns: The assignment type.\n        :rtype: NodeNG\n        \"\"\"\n        return self\n\n    def _get_filtered_stmts(self, lookup_node, node, stmts, mystmt):\n        \"\"\"method used in filter_stmts\"\"\"\n        if self is mystmt:\n            if isinstance(lookup_node, (Const, Name)):\n                return [lookup_node], True\n\n        elif self.statement() is mystmt:\n            # original node's statement is the assignment, only keeps\n            # current node (gen exp, list comp)\n\n            return [node], True\n\n        return stmts, False\n\n    def get_children(self):\n        yield self.target\n        yield self.iter\n\n        yield from self.ifs\n\n\nclass Const(mixins.NoChildrenMixin, NodeNG, Instance):\n    \"\"\"Class representing any constant including num, str, bool, None, bytes.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('(5, \"This is a string.\", True, None, b\"bytes\")')\n    >>> node\n    <Tuple.tuple l.1 at 0x7f23b2e358d0>\n    >>> list(node.get_children())\n    [<Const.int l.1 at 0x7f23b2e35940>,\n    <Const.str l.1 at 0x7f23b2e35978>,\n    <Const.bool l.1 at 0x7f23b2e359b0>,\n    <Const.NoneType l.1 at 0x7f23b2e359e8>,\n    <Const.bytes l.1 at 0x7f23b2e35a20>]\n    \"\"\"\n\n    _other_fields = (\"value\", \"kind\")\n\n    def __init__(\n        self,\n        value: typing.Any,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n        kind: Optional[str] = None,\n    ) -> None:\n        \"\"\"\n        :param value: The value that the constant represents.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n\n        :param kind: The string prefix. \"u\" for u-prefixed strings and ``None`` otherwise. Python 3.8+ only.\n        \"\"\"\n        self.value: typing.Any = value\n        \"\"\"The value that the constant represents.\"\"\"\n\n        self.kind: Optional[str] = kind  # can be None\n        \"\"\"\"The string prefix. \"u\" for u-prefixed strings and ``None`` otherwise. Python 3.8+ only.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def __getattr__(self, name):\n        # This is needed because of Proxy's __getattr__ method.\n        # Calling object.__new__ on this class without calling\n        # __init__ would result in an infinite loop otherwise\n        # since __getattr__ is called when an attribute doesn't\n        # exist and self._proxied indirectly calls self.value\n        # and Proxy __getattr__ calls self.value\n        if name == \"value\":\n            raise AttributeError\n        return super().__getattr__(name)\n\n    def getitem(self, index, context=None):\n        \"\"\"Get an item from this node if subscriptable.\n\n        :param index: The node to use as a subscript index.\n        :type index: Const or Slice\n\n        :raises AstroidTypeError: When the given index cannot be used as a\n            subscript index, or if this node is not subscriptable.\n        \"\"\"\n        if isinstance(index, Const):\n            index_value = index.value\n        elif isinstance(index, Slice):\n            index_value = _infer_slice(index, context=context)\n\n        else:\n            raise AstroidTypeError(\n                f\"Could not use type {type(index)} as subscript index\"\n            )\n\n        try:\n            if isinstance(self.value, (str, bytes)):\n                return Const(self.value[index_value])\n        except IndexError as exc:\n            raise AstroidIndexError(\n                message=\"Index {index!r} out of range\",\n                node=self,\n                index=index,\n                context=context,\n            ) from exc\n        except TypeError as exc:\n            raise AstroidTypeError(\n                message=\"Type error {error!r}\", node=self, index=index, context=context\n            ) from exc\n\n        raise AstroidTypeError(f\"{self!r} (value={self.value})\")\n\n    def has_dynamic_getattr(self):\n        \"\"\"Check if the node has a custom __getattr__ or __getattribute__.\n\n        :returns: True if the class has a custom\n            __getattr__ or __getattribute__, False otherwise.\n            For a :class:`Const` this is always ``False``.\n        :rtype: bool\n        \"\"\"\n        return False\n\n    def itered(self):\n        \"\"\"An iterator over the elements this node contains.\n\n        :returns: The contents of this node.\n        :rtype: iterable(Const)\n\n        :raises TypeError: If this node does not represent something that is iterable.\n        \"\"\"\n        if isinstance(self.value, str):\n            return [const_factory(elem) for elem in self.value]\n        raise TypeError(f\"Cannot iterate over type {type(self.value)!r}\")\n\n    def pytype(self):\n        \"\"\"Get the name of the type that this node represents.\n\n        :returns: The name of the type.\n        :rtype: str\n        \"\"\"\n        return self._proxied.qname()\n\n    def bool_value(self, context=None):\n        \"\"\"Determine the boolean value of this node.\n\n        :returns: The boolean value of this node.\n        :rtype: bool\n        \"\"\"\n        return bool(self.value)\n\n\nclass Continue(mixins.NoChildrenMixin, Statement):\n    \"\"\"Class representing an :class:`ast.Continue` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('continue')\n    >>> node\n    <Continue l.1 at 0x7f23b2e35588>\n    \"\"\"\n\n\nclass Decorators(NodeNG):\n    \"\"\"A node representing a list of decorators.\n\n    A :class:`Decorators` is the decorators that are applied to\n    a method or function.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    @property\n    def my_property(self):\n        return 3\n    ''')\n    >>> node\n    <FunctionDef.my_property l.2 at 0x7f23b2e35d30>\n    >>> list(node.get_children())[0]\n    <Decorators l.1 at 0x7f23b2e35d68>\n    \"\"\"\n\n    _astroid_fields = (\"nodes\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.nodes: typing.List[NodeNG]\n        \"\"\"The decorators that this node contains.\n\n        :type: list(Name or Call) or None\n        \"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, nodes: typing.List[NodeNG]) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param nodes: The decorators that this node contains.\n        :type nodes: list(Name or Call)\n        \"\"\"\n        self.nodes = nodes\n\n    def scope(self) -> \"LocalsDictNodeNG\":\n        \"\"\"The first parent node defining a new scope.\n        These can be Module, FunctionDef, ClassDef, Lambda, or GeneratorExp nodes.\n\n        :returns: The first parent scope node.\n        \"\"\"\n        # skip the function node to go directly to the upper level scope\n        if not self.parent:\n            raise ParentMissingError(target=self)\n        if not self.parent.parent:\n            raise ParentMissingError(target=self.parent)\n        return self.parent.parent.scope()\n\n    def get_children(self):\n        yield from self.nodes\n\n\nclass DelAttr(mixins.ParentAssignTypeMixin, NodeNG):\n    \"\"\"Variation of :class:`ast.Delete` representing deletion of an attribute.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('del self.attr')\n    >>> node\n    <Delete l.1 at 0x7f23b2e35f60>\n    >>> list(node.get_children())[0]\n    <DelAttr.attr l.1 at 0x7f23b2e411d0>\n    \"\"\"\n\n    _astroid_fields = (\"expr\",)\n    _other_fields = (\"attrname\",)\n\n    @decorators.deprecate_default_argument_values(attrname=\"str\")\n    def __init__(\n        self,\n        attrname: Optional[str] = None,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param attrname: The name of the attribute that is being deleted.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.expr: Optional[NodeNG] = None\n        \"\"\"The name that this node represents.\n\n        :type: Name or None\n        \"\"\"\n\n        self.attrname: Optional[str] = attrname\n        \"\"\"The name of the attribute that is being deleted.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, expr: Optional[NodeNG] = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param expr: The name that this node represents.\n        :type expr: Name or None\n        \"\"\"\n        self.expr = expr\n\n    def get_children(self):\n        yield self.expr\n\n\nclass Delete(mixins.AssignTypeMixin, Statement):\n    \"\"\"Class representing an :class:`ast.Delete` node.\n\n    A :class:`Delete` is a ``del`` statement this is deleting something.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('del self.attr')\n    >>> node\n    <Delete l.1 at 0x7f23b2e35f60>\n    \"\"\"\n\n    _astroid_fields = (\"targets\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.targets: typing.List[NodeNG] = []\n        \"\"\"What is being deleted.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, targets: Optional[typing.List[NodeNG]] = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param targets: What is being deleted.\n        \"\"\"\n        if targets is not None:\n            self.targets = targets\n\n    def get_children(self):\n        yield from self.targets\n\n\nclass Dict(NodeNG, Instance):\n    \"\"\"Class representing an :class:`ast.Dict` node.\n\n    A :class:`Dict` is a dictionary that is created with ``{}`` syntax.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('{1: \"1\"}')\n    >>> node\n    <Dict.dict l.1 at 0x7f23b2e35cc0>\n    \"\"\"\n\n    _astroid_fields = (\"items\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.items: typing.List[typing.Tuple[NodeNG, NodeNG]] = []\n        \"\"\"The key-value pairs contained in the dictionary.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, items: typing.List[typing.Tuple[NodeNG, NodeNG]]) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param items: The key-value pairs contained in the dictionary.\n        \"\"\"\n        self.items = items\n\n    @classmethod\n    def from_elements(cls, items=None):\n        \"\"\"Create a :class:`Dict` of constants from a live dictionary.\n\n        :param items: The items to store in the node.\n        :type items: dict\n\n        :returns: The created dictionary node.\n        :rtype: Dict\n        \"\"\"\n        node = cls()\n        if items is None:\n            node.items = []\n        else:\n            node.items = [\n                (const_factory(k), const_factory(v) if _is_const(v) else v)\n                for k, v in items.items()\n                # The keys need to be constants\n                if _is_const(k)\n            ]\n        return node\n\n    def pytype(self):\n        \"\"\"Get the name of the type that this node represents.\n\n        :returns: The name of the type.\n        :rtype: str\n        \"\"\"\n        return \"builtins.dict\"\n\n    def get_children(self):\n        \"\"\"Get the key and value nodes below this node.\n\n        Children are returned in the order that they are defined in the source\n        code, key first then the value.\n\n        :returns: The children.\n        :rtype: iterable(NodeNG)\n        \"\"\"\n        for key, value in self.items:\n            yield key\n            yield value\n\n    def last_child(self):\n        \"\"\"An optimized version of list(get_children())[-1]\n\n        :returns: The last child, or None if no children exist.\n        :rtype: NodeNG or None\n        \"\"\"\n        if self.items:\n            return self.items[-1][1]\n        return None\n\n    def itered(self):\n        \"\"\"An iterator over the keys this node contains.\n\n        :returns: The keys of this node.\n        :rtype: iterable(NodeNG)\n        \"\"\"\n        return [key for (key, _) in self.items]\n\n    def getitem(self, index, context=None):\n        \"\"\"Get an item from this node.\n\n        :param index: The node to use as a subscript index.\n        :type index: Const or Slice\n\n        :raises AstroidTypeError: When the given index cannot be used as a\n            subscript index, or if this node is not subscriptable.\n        :raises AstroidIndexError: If the given index does not exist in the\n            dictionary.\n        \"\"\"\n        for key, value in self.items:\n            # TODO(cpopa): no support for overriding yet, {1:2, **{1: 3}}.\n            if isinstance(key, DictUnpack):\n                try:\n                    return value.getitem(index, context)\n                except (AstroidTypeError, AstroidIndexError):\n                    continue\n            for inferredkey in key.infer(context):\n                if inferredkey is util.Uninferable:\n                    continue\n                if isinstance(inferredkey, Const) and isinstance(index, Const):\n                    if inferredkey.value == index.value:\n                        return value\n\n        raise AstroidIndexError(index)\n\n    def bool_value(self, context=None):\n        \"\"\"Determine the boolean value of this node.\n\n        :returns: The boolean value of this node.\n        :rtype: bool\n        \"\"\"\n        return bool(self.items)\n\n\nclass Expr(Statement):\n    \"\"\"Class representing an :class:`ast.Expr` node.\n\n    An :class:`Expr` is any expression that does not have its value used or\n    stored.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('method()')\n    >>> node\n    <Call l.1 at 0x7f23b2e352b0>\n    >>> node.parent\n    <Expr l.1 at 0x7f23b2e35278>\n    \"\"\"\n\n    _astroid_fields = (\"value\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.value: Optional[NodeNG] = None\n        \"\"\"What the expression does.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, value: Optional[NodeNG] = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: What the expression does.\n        \"\"\"\n        self.value = value\n\n    def get_children(self):\n        yield self.value\n\n    def _get_yield_nodes_skip_lambdas(self):\n        if not self.value.is_lambda:\n            yield from self.value._get_yield_nodes_skip_lambdas()\n\n\nclass Ellipsis(mixins.NoChildrenMixin, NodeNG):  # pylint: disable=redefined-builtin\n    \"\"\"Class representing an :class:`ast.Ellipsis` node.\n\n    An :class:`Ellipsis` is the ``...`` syntax.\n\n    Deprecated since v2.6.0 - Use :class:`Const` instead.\n    Will be removed with the release v2.7.0\n    \"\"\"\n\n\nclass EmptyNode(mixins.NoChildrenMixin, NodeNG):\n    \"\"\"Holds an arbitrary object in the :attr:`LocalsDictNodeNG.locals`.\"\"\"\n\n    object = None\n\n\nclass ExceptHandler(mixins.MultiLineBlockMixin, mixins.AssignTypeMixin, Statement):\n    \"\"\"Class representing an :class:`ast.ExceptHandler`. node.\n\n    An :class:`ExceptHandler` is an ``except`` block on a try-except.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n        try:\n            do_something()\n        except Exception as error:\n            print(\"Error!\")\n        ''')\n    >>> node\n    <TryExcept l.2 at 0x7f23b2e9d908>\n    >>> node.handlers\n    [<ExceptHandler l.4 at 0x7f23b2e9e860>]\n    \"\"\"\n\n    _astroid_fields = (\"type\", \"name\", \"body\")\n    _multi_line_block_fields = (\"body\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.type: Optional[NodeNG] = None  # can be None\n        \"\"\"The types that the block handles.\n\n        :type: Tuple or NodeNG or None\n        \"\"\"\n\n        self.name: Optional[AssignName] = None  # can be None\n        \"\"\"The name that the caught exception is assigned to.\"\"\"\n\n        self.body: typing.List[NodeNG] = []\n        \"\"\"The contents of the block.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def get_children(self):\n        if self.type is not None:\n            yield self.type\n\n        if self.name is not None:\n            yield self.name\n\n        yield from self.body\n\n    # pylint: disable=redefined-builtin; had to use the same name as builtin ast module.\n    def postinit(\n        self,\n        type: Optional[NodeNG] = None,\n        name: Optional[AssignName] = None,\n        body: Optional[typing.List[NodeNG]] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param type: The types that the block handles.\n        :type type: Tuple or NodeNG or None\n\n        :param name: The name that the caught exception is assigned to.\n\n        :param body:The contents of the block.\n        \"\"\"\n        self.type = type\n        self.name = name\n        if body is not None:\n            self.body = body\n\n    @decorators.cachedproperty\n    def blockstart_tolineno(self):\n        \"\"\"The line on which the beginning of this block ends.\n\n        :type: int\n        \"\"\"\n        if self.name:\n            return self.name.tolineno\n        if self.type:\n            return self.type.tolineno\n        return self.lineno\n\n    def catch(self, exceptions: Optional[typing.List[str]]) -> bool:\n        \"\"\"Check if this node handles any of the given\n\n        :param exceptions: The names of the exceptions to check for.\n        \"\"\"\n        if self.type is None or exceptions is None:\n            return True\n        for node in self.type._get_name_nodes():\n            if node.name in exceptions:\n                return True\n        return False\n\n\nclass ExtSlice(NodeNG):\n    \"\"\"Class representing an :class:`ast.ExtSlice` node.\n\n    An :class:`ExtSlice` is a complex slice expression.\n\n    Deprecated since v2.6.0 - Now part of the :class:`Subscript` node.\n    Will be removed with the release of v2.7.0\n    \"\"\"\n\n\nclass For(\n    mixins.MultiLineBlockMixin,\n    mixins.BlockRangeMixIn,\n    mixins.AssignTypeMixin,\n    Statement,\n):\n    \"\"\"Class representing an :class:`ast.For` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('for thing in things: print(thing)')\n    >>> node\n    <For l.1 at 0x7f23b2e8cf28>\n    \"\"\"\n\n    _astroid_fields = (\"target\", \"iter\", \"body\", \"orelse\")\n    _other_other_fields = (\"type_annotation\",)\n    _multi_line_block_fields = (\"body\", \"orelse\")\n\n    optional_assign = True\n    \"\"\"Whether this node optionally assigns a variable.\n\n    This is always ``True`` for :class:`For` nodes.\n    \"\"\"\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.target: Optional[NodeNG] = None\n        \"\"\"What the loop assigns to.\"\"\"\n\n        self.iter: Optional[NodeNG] = None\n        \"\"\"What the loop iterates over.\"\"\"\n\n        self.body: typing.List[NodeNG] = []\n        \"\"\"The contents of the body of the loop.\"\"\"\n\n        self.orelse: typing.List[NodeNG] = []\n        \"\"\"The contents of the ``else`` block of the loop.\"\"\"\n\n        self.type_annotation: Optional[NodeNG] = None  # can be None\n        \"\"\"If present, this will contain the type annotation passed by a type comment\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    # pylint: disable=redefined-builtin; had to use the same name as builtin ast module.\n    def postinit(\n        self,\n        target: Optional[NodeNG] = None,\n        iter: Optional[NodeNG] = None,\n        body: Optional[typing.List[NodeNG]] = None,\n        orelse: Optional[typing.List[NodeNG]] = None,\n        type_annotation: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param target: What the loop assigns to.\n\n        :param iter: What the loop iterates over.\n\n        :param body: The contents of the body of the loop.\n\n        :param orelse: The contents of the ``else`` block of the loop.\n        \"\"\"\n        self.target = target\n        self.iter = iter\n        if body is not None:\n            self.body = body\n        if orelse is not None:\n            self.orelse = orelse\n        self.type_annotation = type_annotation\n\n    @decorators.cachedproperty\n    def blockstart_tolineno(self):\n        \"\"\"The line on which the beginning of this block ends.\n\n        :type: int\n        \"\"\"\n        return self.iter.tolineno\n\n    def get_children(self):\n        yield self.target\n        yield self.iter\n\n        yield from self.body\n        yield from self.orelse\n\n\nclass AsyncFor(For):\n    \"\"\"Class representing an :class:`ast.AsyncFor` node.\n\n    An :class:`AsyncFor` is an asynchronous :class:`For` built with\n    the ``async`` keyword.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    async def func(things):\n        async for thing in things:\n            print(thing)\n    ''')\n    >>> node\n    <AsyncFunctionDef.func l.2 at 0x7f23b2e416d8>\n    >>> node.body[0]\n    <AsyncFor l.3 at 0x7f23b2e417b8>\n    \"\"\"\n\n\nclass Await(NodeNG):\n    \"\"\"Class representing an :class:`ast.Await` node.\n\n    An :class:`Await` is the ``await`` keyword.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    async def func(things):\n        await other_func()\n    ''')\n    >>> node\n    <AsyncFunctionDef.func l.2 at 0x7f23b2e41748>\n    >>> node.body[0]\n    <Expr l.3 at 0x7f23b2e419e8>\n    >>> list(node.body[0].get_children())[0]\n    <Await l.3 at 0x7f23b2e41a20>\n    \"\"\"\n\n    _astroid_fields = (\"value\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.value: Optional[NodeNG] = None\n        \"\"\"What to wait for.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, value: Optional[NodeNG] = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: What to wait for.\n        \"\"\"\n        self.value = value\n\n    def get_children(self):\n        yield self.value\n\n\nclass ImportFrom(mixins.NoChildrenMixin, mixins.ImportFromMixin, Statement):\n    \"\"\"Class representing an :class:`ast.ImportFrom` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('from my_package import my_module')\n    >>> node\n    <ImportFrom l.1 at 0x7f23b2e415c0>\n    \"\"\"\n\n    _other_fields = (\"modname\", \"names\", \"level\")\n\n    def __init__(\n        self,\n        fromname: Optional[str],\n        names: typing.List[typing.Tuple[str, Optional[str]]],\n        level: Optional[int] = 0,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param fromname: The module that is being imported from.\n\n        :param names: What is being imported from the module.\n\n        :param level: The level of relative import.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.modname: Optional[str] = fromname  # can be None\n        \"\"\"The module that is being imported from.\n\n        This is ``None`` for relative imports.\n        \"\"\"\n\n        self.names: typing.List[typing.Tuple[str, Optional[str]]] = names\n        \"\"\"What is being imported from the module.\n\n        Each entry is a :class:`tuple` of the name being imported,\n        and the alias that the name is assigned to (if any).\n        \"\"\"\n\n        # TODO When is 'level' None?\n        self.level: Optional[int] = level  # can be None\n        \"\"\"The level of relative import.\n\n        Essentially this is the number of dots in the import.\n        This is always 0 for absolute imports.\n        \"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n\nclass Attribute(NodeNG):\n    \"\"\"Class representing an :class:`ast.Attribute` node.\"\"\"\n\n    _astroid_fields = (\"expr\",)\n    _other_fields = (\"attrname\",)\n\n    @decorators.deprecate_default_argument_values(attrname=\"str\")\n    def __init__(\n        self,\n        attrname: Optional[str] = None,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param attrname: The name of the attribute.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.expr: Optional[NodeNG] = None\n        \"\"\"The name that this node represents.\n\n        :type: Name or None\n        \"\"\"\n\n        self.attrname: Optional[str] = attrname\n        \"\"\"The name of the attribute.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, expr: Optional[NodeNG] = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param expr: The name that this node represents.\n        :type expr: Name or None\n        \"\"\"\n        self.expr = expr\n\n    def get_children(self):\n        yield self.expr\n\n\nclass Global(mixins.NoChildrenMixin, Statement):\n    \"\"\"Class representing an :class:`ast.Global` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('global a_global')\n    >>> node\n    <Global l.1 at 0x7f23b2e9de10>\n    \"\"\"\n\n    _other_fields = (\"names\",)\n\n    def __init__(\n        self,\n        names: typing.List[str],\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param names: The names being declared as global.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.names: typing.List[str] = names\n        \"\"\"The names being declared as global.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def _infer_name(self, frame, name):\n        return name\n\n\nclass If(mixins.MultiLineBlockMixin, mixins.BlockRangeMixIn, Statement):\n    \"\"\"Class representing an :class:`ast.If` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('if condition: print(True)')\n    >>> node\n    <If l.1 at 0x7f23b2e9dd30>\n    \"\"\"\n\n    _astroid_fields = (\"test\", \"body\", \"orelse\")\n    _multi_line_block_fields = (\"body\", \"orelse\")\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.test: Optional[NodeNG] = None\n        \"\"\"The condition that the statement tests.\"\"\"\n\n        self.body: typing.List[NodeNG] = []\n        \"\"\"The contents of the block.\"\"\"\n\n        self.orelse: typing.List[NodeNG] = []\n        \"\"\"The contents of the ``else`` block.\"\"\"\n\n        self.is_orelse: bool = False\n        \"\"\"Whether the if-statement is the orelse-block of another if statement.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        test: Optional[NodeNG] = None,\n        body: Optional[typing.List[NodeNG]] = None,\n        orelse: Optional[typing.List[NodeNG]] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param test: The condition that the statement tests.\n\n        :param body: The contents of the block.\n\n        :param orelse: The contents of the ``else`` block.\n        \"\"\"\n        self.test = test\n        if body is not None:\n            self.body = body\n        if orelse is not None:\n            self.orelse = orelse\n        if isinstance(self.parent, If) and self in self.parent.orelse:\n            self.is_orelse = True\n\n    @decorators.cachedproperty\n    def blockstart_tolineno(self):\n        \"\"\"The line on which the beginning of this block ends.\n\n        :type: int\n        \"\"\"\n        return self.test.tolineno\n\n    def block_range(self, lineno):\n        \"\"\"Get a range from the given line number to where this node ends.\n\n        :param lineno: The line number to start the range at.\n        :type lineno: int\n\n        :returns: The range of line numbers that this node belongs to,\n            starting at the given line number.\n        :rtype: tuple(int, int)\n        \"\"\"\n        if lineno == self.body[0].fromlineno:\n            return lineno, lineno\n        if lineno <= self.body[-1].tolineno:\n            return lineno, self.body[-1].tolineno\n        return self._elsed_block_range(lineno, self.orelse, self.body[0].fromlineno - 1)\n\n    def get_children(self):\n        yield self.test\n\n        yield from self.body\n        yield from self.orelse\n\n    def has_elif_block(self):\n        return len(self.orelse) == 1 and isinstance(self.orelse[0], If)\n\n    def _get_yield_nodes_skip_lambdas(self):\n        \"\"\"An If node can contain a Yield node in the test\"\"\"\n        yield from self.test._get_yield_nodes_skip_lambdas()\n        yield from super()._get_yield_nodes_skip_lambdas()\n\n    def is_sys_guard(self) -> bool:\n        \"\"\"Return True if IF stmt is a sys.version_info guard.\n\n        >>> import astroid\n        >>> node = astroid.extract_node('''\n        import sys\n        if sys.version_info > (3, 8):\n            from typing import Literal\n        else:\n            from typing_extensions import Literal\n        ''')\n        >>> node.is_sys_guard()\n        True\n        \"\"\"\n        warnings.warn(\n            \"The 'is_sys_guard' function is deprecated and will be removed in astroid 3.0.0 \"\n            \"It has been moved to pylint and can be imported from 'pylint.checkers.utils' \"\n            \"starting with pylint 2.12\",\n            DeprecationWarning,\n        )\n        if isinstance(self.test, Compare):\n            value = self.test.left\n            if isinstance(value, Subscript):\n                value = value.value\n            if isinstance(value, Attribute) and value.as_string() == \"sys.version_info\":\n                return True\n\n        return False\n\n    def is_typing_guard(self) -> bool:\n        \"\"\"Return True if IF stmt is a typing guard.\n\n        >>> import astroid\n        >>> node = astroid.extract_node('''\n        from typing import TYPE_CHECKING\n        if TYPE_CHECKING:\n            from xyz import a\n        ''')\n        >>> node.is_typing_guard()\n        True\n        \"\"\"\n        warnings.warn(\n            \"The 'is_typing_guard' function is deprecated and will be removed in astroid 3.0.0 \"\n            \"It has been moved to pylint and can be imported from 'pylint.checkers.utils' \"\n            \"starting with pylint 2.12\",\n            DeprecationWarning,\n        )\n        return isinstance(\n            self.test, (Name, Attribute)\n        ) and self.test.as_string().endswith(\"TYPE_CHECKING\")\n\n\nclass IfExp(NodeNG):\n    \"\"\"Class representing an :class:`ast.IfExp` node.\n    >>> import astroid\n    >>> node = astroid.extract_node('value if condition else other')\n    >>> node\n    <IfExp l.1 at 0x7f23b2e9dbe0>\n    \"\"\"\n\n    _astroid_fields = (\"test\", \"body\", \"orelse\")\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.test: Optional[NodeNG] = None\n        \"\"\"The condition that the statement tests.\"\"\"\n\n        self.body: Optional[NodeNG] = None\n        \"\"\"The contents of the block.\"\"\"\n\n        self.orelse: Optional[NodeNG] = None\n        \"\"\"The contents of the ``else`` block.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        test: Optional[NodeNG] = None,\n        body: Optional[NodeNG] = None,\n        orelse: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param test: The condition that the statement tests.\n\n        :param body: The contents of the block.\n\n        :param orelse: The contents of the ``else`` block.\n        \"\"\"\n        self.test = test\n        self.body = body\n        self.orelse = orelse\n\n    def get_children(self):\n        yield self.test\n        yield self.body\n        yield self.orelse\n\n    def op_left_associative(self):\n        # `1 if True else 2 if False else 3` is parsed as\n        # `1 if True else (2 if False else 3)`\n        return False\n\n\nclass Import(mixins.NoChildrenMixin, mixins.ImportFromMixin, Statement):\n    \"\"\"Class representing an :class:`ast.Import` node.\n    >>> import astroid\n    >>> node = astroid.extract_node('import astroid')\n    >>> node\n    <Import l.1 at 0x7f23b2e4e5c0>\n    \"\"\"\n\n    _other_fields = (\"names\",)\n\n    @decorators.deprecate_default_argument_values(names=\"list[tuple[str, str | None]]\")\n    def __init__(\n        self,\n        names: Optional[typing.List[typing.Tuple[str, Optional[str]]]] = None,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param names: The names being imported.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.names: typing.List[typing.Tuple[str, Optional[str]]] = names or []\n        \"\"\"The names being imported.\n\n        Each entry is a :class:`tuple` of the name being imported,\n        and the alias that the name is assigned to (if any).\n        \"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n\nclass Index(NodeNG):\n    \"\"\"Class representing an :class:`ast.Index` node.\n\n    An :class:`Index` is a simple subscript.\n\n    Deprecated since v2.6.0 - Now part of the :class:`Subscript` node.\n    Will be removed with the release of v2.7.0\n    \"\"\"\n\n\nclass Keyword(NodeNG):\n    \"\"\"Class representing an :class:`ast.keyword` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('function(a_kwarg=True)')\n    >>> node\n    <Call l.1 at 0x7f23b2e9e320>\n    >>> node.keywords\n    [<Keyword l.1 at 0x7f23b2e9e9b0>]\n    \"\"\"\n\n    _astroid_fields = (\"value\",)\n    _other_fields = (\"arg\",)\n\n    def __init__(\n        self,\n        arg: Optional[str] = None,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param arg: The argument being assigned to.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.arg: Optional[str] = arg  # can be None\n        \"\"\"The argument being assigned to.\"\"\"\n\n        self.value: Optional[NodeNG] = None\n        \"\"\"The value being assigned to the keyword argument.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, value: Optional[NodeNG] = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: The value being assigned to the ketword argument.\n        \"\"\"\n        self.value = value\n\n    def get_children(self):\n        yield self.value\n\n\nclass List(BaseContainer):\n    \"\"\"Class representing an :class:`ast.List` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('[1, 2, 3]')\n    >>> node\n    <List.list l.1 at 0x7f23b2e9e128>\n    \"\"\"\n\n    _other_fields = (\"ctx\",)\n\n    def __init__(\n        self,\n        ctx: Optional[Context] = None,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param ctx: Whether the list is assigned to or loaded from.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.ctx: Optional[Context] = ctx\n        \"\"\"Whether the list is assigned to or loaded from.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def pytype(self):\n        \"\"\"Get the name of the type that this node represents.\n\n        :returns: The name of the type.\n        :rtype: str\n        \"\"\"\n        return \"builtins.list\"\n\n    def getitem(self, index, context=None):\n        \"\"\"Get an item from this node.\n\n        :param index: The node to use as a subscript index.\n        :type index: Const or Slice\n        \"\"\"\n        return _container_getitem(self, self.elts, index, context=context)\n\n\nclass Nonlocal(mixins.NoChildrenMixin, Statement):\n    \"\"\"Class representing an :class:`ast.Nonlocal` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    def function():\n        nonlocal var\n    ''')\n    >>> node\n    <FunctionDef.function l.2 at 0x7f23b2e9e208>\n    >>> node.body[0]\n    <Nonlocal l.3 at 0x7f23b2e9e908>\n    \"\"\"\n\n    _other_fields = (\"names\",)\n\n    def __init__(\n        self,\n        names: typing.List[str],\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param names: The names being declared as not local.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.names: typing.List[str] = names\n        \"\"\"The names being declared as not local.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def _infer_name(self, frame, name):\n        return name\n\n\nclass Pass(mixins.NoChildrenMixin, Statement):\n    \"\"\"Class representing an :class:`ast.Pass` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('pass')\n    >>> node\n    <Pass l.1 at 0x7f23b2e9e748>\n    \"\"\"\n\n\nclass Raise(Statement):\n    \"\"\"Class representing an :class:`ast.Raise` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('raise RuntimeError(\"Something bad happened!\")')\n    >>> node\n    <Raise l.1 at 0x7f23b2e9e828>\n    \"\"\"\n\n    _astroid_fields = (\"exc\", \"cause\")\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.exc: Optional[NodeNG] = None  # can be None\n        \"\"\"What is being raised.\"\"\"\n\n        self.cause: Optional[NodeNG] = None  # can be None\n        \"\"\"The exception being used to raise this one.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        exc: Optional[NodeNG] = None,\n        cause: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param exc: What is being raised.\n\n        :param cause: The exception being used to raise this one.\n        \"\"\"\n        self.exc = exc\n        self.cause = cause\n\n    def raises_not_implemented(self):\n        \"\"\"Check if this node raises a :class:`NotImplementedError`.\n\n        :returns: True if this node raises a :class:`NotImplementedError`,\n            False otherwise.\n        :rtype: bool\n        \"\"\"\n        if not self.exc:\n            return False\n        for name in self.exc._get_name_nodes():\n            if name.name == \"NotImplementedError\":\n                return True\n        return False\n\n    def get_children(self):\n        if self.exc is not None:\n            yield self.exc\n\n        if self.cause is not None:\n            yield self.cause\n\n\nclass Return(Statement):\n    \"\"\"Class representing an :class:`ast.Return` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('return True')\n    >>> node\n    <Return l.1 at 0x7f23b8211908>\n    \"\"\"\n\n    _astroid_fields = (\"value\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.value: Optional[NodeNG] = None  # can be None\n        \"\"\"The value being returned.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, value: Optional[NodeNG] = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: The value being returned.\n        \"\"\"\n        self.value = value\n\n    def get_children(self):\n        if self.value is not None:\n            yield self.value\n\n    def is_tuple_return(self):\n        return isinstance(self.value, Tuple)\n\n    def _get_return_nodes_skip_functions(self):\n        yield self\n\n\nclass Set(BaseContainer):\n    \"\"\"Class representing an :class:`ast.Set` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('{1, 2, 3}')\n    >>> node\n    <Set.set l.1 at 0x7f23b2e71d68>\n    \"\"\"\n\n    def pytype(self):\n        \"\"\"Get the name of the type that this node represents.\n\n        :returns: The name of the type.\n        :rtype: str\n        \"\"\"\n        return \"builtins.set\"\n\n\nclass Slice(NodeNG):\n    \"\"\"Class representing an :class:`ast.Slice` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('things[1:3]')\n    >>> node\n    <Subscript l.1 at 0x7f23b2e71f60>\n    >>> node.slice\n    <Slice l.1 at 0x7f23b2e71e80>\n    \"\"\"\n\n    _astroid_fields = (\"lower\", \"upper\", \"step\")\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.lower: Optional[NodeNG] = None  # can be None\n        \"\"\"The lower index in the slice.\"\"\"\n\n        self.upper: Optional[NodeNG] = None  # can be None\n        \"\"\"The upper index in the slice.\"\"\"\n\n        self.step: Optional[NodeNG] = None  # can be None\n        \"\"\"The step to take between indexes.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        lower: Optional[NodeNG] = None,\n        upper: Optional[NodeNG] = None,\n        step: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param lower: The lower index in the slice.\n\n        :param upper: The upper index in the slice.\n\n        :param step: The step to take between index.\n        \"\"\"\n        self.lower = lower\n        self.upper = upper\n        self.step = step\n\n    def _wrap_attribute(self, attr):\n        \"\"\"Wrap the empty attributes of the Slice in a Const node.\"\"\"\n        if not attr:\n            const = const_factory(attr)\n            const.parent = self\n            return const\n        return attr\n\n    @decorators.cachedproperty\n    def _proxied(self):\n        builtins = AstroidManager().builtins_module\n        return builtins.getattr(\"slice\")[0]\n\n    def pytype(self):\n        \"\"\"Get the name of the type that this node represents.\n\n        :returns: The name of the type.\n        :rtype: str\n        \"\"\"\n        return \"builtins.slice\"\n\n    def igetattr(self, attrname, context=None):\n        \"\"\"Infer the possible values of the given attribute on the slice.\n\n        :param attrname: The name of the attribute to infer.\n        :type attrname: str\n\n        :returns: The inferred possible values.\n        :rtype: iterable(NodeNG)\n        \"\"\"\n        if attrname == \"start\":\n            yield self._wrap_attribute(self.lower)\n        elif attrname == \"stop\":\n            yield self._wrap_attribute(self.upper)\n        elif attrname == \"step\":\n            yield self._wrap_attribute(self.step)\n        else:\n            yield from self.getattr(attrname, context=context)\n\n    def getattr(self, attrname, context=None):\n        return self._proxied.getattr(attrname, context)\n\n    def get_children(self):\n        if self.lower is not None:\n            yield self.lower\n\n        if self.upper is not None:\n            yield self.upper\n\n        if self.step is not None:\n            yield self.step\n\n\nclass Starred(mixins.ParentAssignTypeMixin, NodeNG):\n    \"\"\"Class representing an :class:`ast.Starred` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('*args')\n    >>> node\n    <Starred l.1 at 0x7f23b2e41978>\n    \"\"\"\n\n    _astroid_fields = (\"value\",)\n    _other_fields = (\"ctx\",)\n\n    def __init__(\n        self,\n        ctx: Optional[Context] = None,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param ctx: Whether the list is assigned to or loaded from.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.value: Optional[NodeNG] = None\n        \"\"\"What is being unpacked.\"\"\"\n\n        self.ctx: Optional[Context] = ctx\n        \"\"\"Whether the starred item is assigned to or loaded from.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, value: Optional[NodeNG] = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: What is being unpacked.\n        \"\"\"\n        self.value = value\n\n    def get_children(self):\n        yield self.value\n\n\nclass Subscript(NodeNG):\n    \"\"\"Class representing an :class:`ast.Subscript` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('things[1:3]')\n    >>> node\n    <Subscript l.1 at 0x7f23b2e71f60>\n    \"\"\"\n\n    _astroid_fields = (\"value\", \"slice\")\n    _other_fields = (\"ctx\",)\n\n    def __init__(\n        self,\n        ctx: Optional[Context] = None,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param ctx: Whether the subscripted item is assigned to or loaded from.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.value: Optional[NodeNG] = None\n        \"\"\"What is being indexed.\"\"\"\n\n        self.slice: Optional[NodeNG] = None\n        \"\"\"The slice being used to lookup.\"\"\"\n\n        self.ctx: Optional[Context] = ctx\n        \"\"\"Whether the subscripted item is assigned to or loaded from.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    # pylint: disable=redefined-builtin; had to use the same name as builtin ast module.\n    def postinit(\n        self, value: Optional[NodeNG] = None, slice: Optional[NodeNG] = None\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: What is being indexed.\n\n        :param slice: The slice being used to lookup.\n        \"\"\"\n        self.value = value\n        self.slice = slice\n\n    def get_children(self):\n        yield self.value\n        yield self.slice\n\n\nclass TryExcept(mixins.MultiLineBlockMixin, mixins.BlockRangeMixIn, Statement):\n    \"\"\"Class representing an :class:`ast.TryExcept` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n        try:\n            do_something()\n        except Exception as error:\n            print(\"Error!\")\n        ''')\n    >>> node\n    <TryExcept l.2 at 0x7f23b2e9d908>\n    \"\"\"\n\n    _astroid_fields = (\"body\", \"handlers\", \"orelse\")\n    _multi_line_block_fields = (\"body\", \"handlers\", \"orelse\")\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.body: typing.List[NodeNG] = []\n        \"\"\"The contents of the block to catch exceptions from.\"\"\"\n\n        self.handlers: typing.List[ExceptHandler] = []\n        \"\"\"The exception handlers.\"\"\"\n\n        self.orelse: typing.List[NodeNG] = []\n        \"\"\"The contents of the ``else`` block.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        body: Optional[typing.List[NodeNG]] = None,\n        handlers: Optional[typing.List[ExceptHandler]] = None,\n        orelse: Optional[typing.List[NodeNG]] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param body: The contents of the block to catch exceptions from.\n\n        :param handlers: The exception handlers.\n\n        :param orelse: The contents of the ``else`` block.\n        \"\"\"\n        if body is not None:\n            self.body = body\n        if handlers is not None:\n            self.handlers = handlers\n        if orelse is not None:\n            self.orelse = orelse\n\n    def _infer_name(self, frame, name):\n        return name\n\n    def block_range(self, lineno):\n        \"\"\"Get a range from the given line number to where this node ends.\n\n        :param lineno: The line number to start the range at.\n        :type lineno: int\n\n        :returns: The range of line numbers that this node belongs to,\n            starting at the given line number.\n        :rtype: tuple(int, int)\n        \"\"\"\n        last = None\n        for exhandler in self.handlers:\n            if exhandler.type and lineno == exhandler.type.fromlineno:\n                return lineno, lineno\n            if exhandler.body[0].fromlineno <= lineno <= exhandler.body[-1].tolineno:\n                return lineno, exhandler.body[-1].tolineno\n            if last is None:\n                last = exhandler.body[0].fromlineno - 1\n        return self._elsed_block_range(lineno, self.orelse, last)\n\n    def get_children(self):\n        yield from self.body\n\n        yield from self.handlers or ()\n        yield from self.orelse or ()\n\n\nclass TryFinally(mixins.MultiLineBlockMixin, mixins.BlockRangeMixIn, Statement):\n    \"\"\"Class representing an :class:`ast.TryFinally` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    try:\n        do_something()\n    except Exception as error:\n        print(\"Error!\")\n    finally:\n        print(\"Cleanup!\")\n    ''')\n    >>> node\n    <TryFinally l.2 at 0x7f23b2e41d68>\n    \"\"\"\n\n    _astroid_fields = (\"body\", \"finalbody\")\n    _multi_line_block_fields = (\"body\", \"finalbody\")\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.body: typing.Union[typing.List[TryExcept], typing.List[NodeNG]] = []\n        \"\"\"The try-except that the finally is attached to.\"\"\"\n\n        self.finalbody: typing.List[NodeNG] = []\n        \"\"\"The contents of the ``finally`` block.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        body: typing.Union[typing.List[TryExcept], typing.List[NodeNG], None] = None,\n        finalbody: Optional[typing.List[NodeNG]] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param body: The try-except that the finally is attached to.\n\n        :param finalbody: The contents of the ``finally`` block.\n        \"\"\"\n        if body is not None:\n            self.body = body\n        if finalbody is not None:\n            self.finalbody = finalbody\n\n    def block_range(self, lineno):\n        \"\"\"Get a range from the given line number to where this node ends.\n\n        :param lineno: The line number to start the range at.\n        :type lineno: int\n\n        :returns: The range of line numbers that this node belongs to,\n            starting at the given line number.\n        :rtype: tuple(int, int)\n        \"\"\"\n        child = self.body[0]\n        # py2.5 try: except: finally:\n        if (\n            isinstance(child, TryExcept)\n            and child.fromlineno == self.fromlineno\n            and child.tolineno >= lineno > self.fromlineno\n        ):\n            return child.block_range(lineno)\n        return self._elsed_block_range(lineno, self.finalbody)\n\n    def get_children(self):\n        yield from self.body\n        yield from self.finalbody\n\n\nclass Tuple(BaseContainer):\n    \"\"\"Class representing an :class:`ast.Tuple` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('(1, 2, 3)')\n    >>> node\n    <Tuple.tuple l.1 at 0x7f23b2e41780>\n    \"\"\"\n\n    _other_fields = (\"ctx\",)\n\n    def __init__(\n        self,\n        ctx: Optional[Context] = None,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param ctx: Whether the tuple is assigned to or loaded from.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.ctx: Optional[Context] = ctx\n        \"\"\"Whether the tuple is assigned to or loaded from.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def pytype(self):\n        \"\"\"Get the name of the type that this node represents.\n\n        :returns: The name of the type.\n        :rtype: str\n        \"\"\"\n        return \"builtins.tuple\"\n\n    def getitem(self, index, context=None):\n        \"\"\"Get an item from this node.\n\n        :param index: The node to use as a subscript index.\n        :type index: Const or Slice\n        \"\"\"\n        return _container_getitem(self, self.elts, index, context=context)\n\n\nclass UnaryOp(NodeNG):\n    \"\"\"Class representing an :class:`ast.UnaryOp` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('-5')\n    >>> node\n    <UnaryOp l.1 at 0x7f23b2e4e198>\n    \"\"\"\n\n    _astroid_fields = (\"operand\",)\n    _other_fields = (\"op\",)\n\n    @decorators.deprecate_default_argument_values(op=\"str\")\n    def __init__(\n        self,\n        op: Optional[str] = None,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param op: The operator.\n\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.op: Optional[str] = op\n        \"\"\"The operator.\"\"\"\n\n        self.operand: Optional[NodeNG] = None\n        \"\"\"What the unary operator is applied to.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, operand: Optional[NodeNG] = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param operand: What the unary operator is applied to.\n        \"\"\"\n        self.operand = operand\n\n    # This is set by inference.py\n    def _infer_unaryop(self, context=None):\n        raise NotImplementedError\n\n    def type_errors(self, context=None):\n        \"\"\"Get a list of type errors which can occur during inference.\n\n        Each TypeError is represented by a :class:`BadBinaryOperationMessage`,\n        which holds the original exception.\n\n        :returns: The list of possible type errors.\n        :rtype: list(BadBinaryOperationMessage)\n        \"\"\"\n        try:\n            results = self._infer_unaryop(context=context)\n            return [\n                result\n                for result in results\n                if isinstance(result, util.BadUnaryOperationMessage)\n            ]\n        except InferenceError:\n            return []\n\n    def get_children(self):\n        yield self.operand\n\n    def op_precedence(self):\n        if self.op == \"not\":\n            return OP_PRECEDENCE[self.op]\n\n        return super().op_precedence()\n\n\nclass While(mixins.MultiLineBlockMixin, mixins.BlockRangeMixIn, Statement):\n    \"\"\"Class representing an :class:`ast.While` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    while condition():\n        print(\"True\")\n    ''')\n    >>> node\n    <While l.2 at 0x7f23b2e4e390>\n    \"\"\"\n\n    _astroid_fields = (\"test\", \"body\", \"orelse\")\n    _multi_line_block_fields = (\"body\", \"orelse\")\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.test: Optional[NodeNG] = None\n        \"\"\"The condition that the loop tests.\"\"\"\n\n        self.body: typing.List[NodeNG] = []\n        \"\"\"The contents of the loop.\"\"\"\n\n        self.orelse: typing.List[NodeNG] = []\n        \"\"\"The contents of the ``else`` block.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        test: Optional[NodeNG] = None,\n        body: Optional[typing.List[NodeNG]] = None,\n        orelse: Optional[typing.List[NodeNG]] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param test: The condition that the loop tests.\n\n        :param body: The contents of the loop.\n\n        :param orelse: The contents of the ``else`` block.\n        \"\"\"\n        self.test = test\n        if body is not None:\n            self.body = body\n        if orelse is not None:\n            self.orelse = orelse\n\n    @decorators.cachedproperty\n    def blockstart_tolineno(self):\n        \"\"\"The line on which the beginning of this block ends.\n\n        :type: int\n        \"\"\"\n        return self.test.tolineno\n\n    def block_range(self, lineno):\n        \"\"\"Get a range from the given line number to where this node ends.\n\n        :param lineno: The line number to start the range at.\n        :type lineno: int\n\n        :returns: The range of line numbers that this node belongs to,\n            starting at the given line number.\n        :rtype: tuple(int, int)\n        \"\"\"\n        return self._elsed_block_range(lineno, self.orelse)\n\n    def get_children(self):\n        yield self.test\n\n        yield from self.body\n        yield from self.orelse\n\n    def _get_yield_nodes_skip_lambdas(self):\n        \"\"\"A While node can contain a Yield node in the test\"\"\"\n        yield from self.test._get_yield_nodes_skip_lambdas()\n        yield from super()._get_yield_nodes_skip_lambdas()\n\n\nclass With(\n    mixins.MultiLineBlockMixin,\n    mixins.BlockRangeMixIn,\n    mixins.AssignTypeMixin,\n    Statement,\n):\n    \"\"\"Class representing an :class:`ast.With` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    with open(file_path) as file_:\n        print(file_.read())\n    ''')\n    >>> node\n    <With l.2 at 0x7f23b2e4e710>\n    \"\"\"\n\n    _astroid_fields = (\"items\", \"body\")\n    _other_other_fields = (\"type_annotation\",)\n    _multi_line_block_fields = (\"body\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.items: typing.List[typing.Tuple[NodeNG, Optional[NodeNG]]] = []\n        \"\"\"The pairs of context managers and the names they are assigned to.\"\"\"\n\n        self.body: typing.List[NodeNG] = []\n        \"\"\"The contents of the ``with`` block.\"\"\"\n\n        self.type_annotation: Optional[NodeNG] = None  # can be None\n        \"\"\"If present, this will contain the type annotation passed by a type comment\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        items: Optional[typing.List[typing.Tuple[NodeNG, Optional[NodeNG]]]] = None,\n        body: Optional[typing.List[NodeNG]] = None,\n        type_annotation: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param items: The pairs of context managers and the names\n            they are assigned to.\n\n        :param body: The contents of the ``with`` block.\n        \"\"\"\n        if items is not None:\n            self.items = items\n        if body is not None:\n            self.body = body\n        self.type_annotation = type_annotation\n\n    @decorators.cachedproperty\n    def blockstart_tolineno(self):\n        \"\"\"The line on which the beginning of this block ends.\n\n        :type: int\n        \"\"\"\n        return self.items[-1][0].tolineno\n\n    def get_children(self):\n        \"\"\"Get the child nodes below this node.\n\n        :returns: The children.\n        :rtype: iterable(NodeNG)\n        \"\"\"\n        for expr, var in self.items:\n            yield expr\n            if var:\n                yield var\n        yield from self.body\n\n\nclass AsyncWith(With):\n    \"\"\"Asynchronous ``with`` built with the ``async`` keyword.\"\"\"\n\n\nclass Yield(NodeNG):\n    \"\"\"Class representing an :class:`ast.Yield` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('yield True')\n    >>> node\n    <Yield l.1 at 0x7f23b2e4e5f8>\n    \"\"\"\n\n    _astroid_fields = (\"value\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.value: Optional[NodeNG] = None  # can be None\n        \"\"\"The value to yield.\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, value: Optional[NodeNG] = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: The value to yield.\n        \"\"\"\n        self.value = value\n\n    def get_children(self):\n        if self.value is not None:\n            yield self.value\n\n    def _get_yield_nodes_skip_lambdas(self):\n        yield self\n\n\nclass YieldFrom(Yield):  # TODO value is required, not optional\n    \"\"\"Class representing an :class:`ast.YieldFrom` node.\"\"\"\n\n\nclass DictUnpack(mixins.NoChildrenMixin, NodeNG):\n    \"\"\"Represents the unpacking of dicts into dicts using :pep:`448`.\"\"\"\n\n\nclass FormattedValue(NodeNG):\n    \"\"\"Class representing an :class:`ast.FormattedValue` node.\n\n    Represents a :pep:`498` format string.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('f\"Format {type_}\"')\n    >>> node\n    <JoinedStr l.1 at 0x7f23b2e4ed30>\n    >>> node.values\n    [<Const.str l.1 at 0x7f23b2e4eda0>, <FormattedValue l.1 at 0x7f23b2e4edd8>]\n    \"\"\"\n\n    _astroid_fields = (\"value\", \"format_spec\")\n    _other_fields = (\"conversion\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.value: NodeNG\n        \"\"\"The value to be formatted into the string.\"\"\"\n\n        self.conversion: Optional[int] = None  # can be None\n        \"\"\"The type of formatting to be applied to the value.\n\n        .. seealso::\n            :class:`ast.FormattedValue`\n        \"\"\"\n\n        self.format_spec: Optional[NodeNG] = None  # can be None\n        \"\"\"The formatting to be applied to the value.\n\n        .. seealso::\n            :class:`ast.FormattedValue`\n\n        :type: JoinedStr or None\n        \"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        value: NodeNG,\n        conversion: Optional[int] = None,\n        format_spec: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: The value to be formatted into the string.\n\n        :param conversion: The type of formatting to be applied to the value.\n\n        :param format_spec: The formatting to be applied to the value.\n        :type format_spec: JoinedStr or None\n        \"\"\"\n        self.value = value\n        self.conversion = conversion\n        self.format_spec = format_spec\n\n    def get_children(self):\n        yield self.value\n\n        if self.format_spec is not None:\n            yield self.format_spec\n\n\nclass JoinedStr(NodeNG):\n    \"\"\"Represents a list of string expressions to be joined.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('f\"Format {type_}\"')\n    >>> node\n    <JoinedStr l.1 at 0x7f23b2e4ed30>\n    \"\"\"\n\n    _astroid_fields = (\"values\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.values: typing.List[NodeNG] = []\n        \"\"\"The string expressions to be joined.\n\n        :type: list(FormattedValue or Const)\n        \"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, values: Optional[typing.List[NodeNG]] = None) -> None:\n        \"\"\"Do some setup after initialisation.\n\n        :param value: The string expressions to be joined.\n\n        :type: list(FormattedValue or Const)\n        \"\"\"\n        if values is not None:\n            self.values = values\n\n    def get_children(self):\n        yield from self.values\n\n\nclass NamedExpr(mixins.AssignTypeMixin, NodeNG):\n    \"\"\"Represents the assignment from the assignment expression\n\n    >>> import astroid\n    >>> module = astroid.parse('if a := 1: pass')\n    >>> module.body[0].test\n    <NamedExpr l.1 at 0x7f23b2e4ed30>\n    \"\"\"\n\n    _astroid_fields = (\"target\", \"value\")\n\n    optional_assign = True\n    \"\"\"Whether this node optionally assigns a variable.\n\n    Since NamedExpr are not always called they do not always assign.\"\"\"\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        \"\"\"\n        :param lineno: The line that this node appears on in the source code.\n\n        :param col_offset: The column that this node appears on in the\n            source code.\n\n        :param parent: The parent node in the syntax tree.\n        \"\"\"\n        self.target: NodeNG\n        \"\"\"The assignment target\n\n        :type: Name\n        \"\"\"\n\n        self.value: NodeNG\n        \"\"\"The value that gets assigned in the expression\"\"\"\n\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, target: NodeNG, value: NodeNG) -> None:\n        self.target = target\n        self.value = value\n\n    def frame(self):\n        \"\"\"The first parent frame node.\n\n        A frame node is a :class:`Module`, :class:`FunctionDef`,\n        or :class:`ClassDef`.\n\n        :returns: The first parent frame node.\n        \"\"\"\n        if not self.parent:\n            raise ParentMissingError(target=self)\n\n        # For certain parents NamedExpr evaluate to the scope of the parent\n        if isinstance(self.parent, (Arguments, Keyword, Comprehension)):\n            if not self.parent.parent:\n                raise ParentMissingError(target=self.parent)\n            if not self.parent.parent.parent:\n                raise ParentMissingError(target=self.parent.parent)\n            return self.parent.parent.parent.frame()\n\n        return self.parent.frame()\n\n    def scope(self) -> \"LocalsDictNodeNG\":\n        \"\"\"The first parent node defining a new scope.\n        These can be Module, FunctionDef, ClassDef, Lambda, or GeneratorExp nodes.\n\n        :returns: The first parent scope node.\n        \"\"\"\n        if not self.parent:\n            raise ParentMissingError(target=self)\n\n        # For certain parents NamedExpr evaluate to the scope of the parent\n        if isinstance(self.parent, (Arguments, Keyword, Comprehension)):\n            if not self.parent.parent:\n                raise ParentMissingError(target=self.parent)\n            if not self.parent.parent.parent:\n                raise ParentMissingError(target=self.parent.parent)\n            return self.parent.parent.parent.scope()\n\n        return self.parent.scope()\n\n    def set_local(self, name: str, stmt: AssignName) -> None:\n        \"\"\"Define that the given name is declared in the given statement node.\n        NamedExpr's in Arguments, Keyword or Comprehension are evaluated in their\n        parent's parent scope. So we add to their frame's locals.\n\n        .. seealso:: :meth:`scope`\n\n        :param name: The name that is being defined.\n\n        :param stmt: The statement that defines the given name.\n        \"\"\"\n        self.frame().set_local(name, stmt)\n\n\nclass Unknown(mixins.AssignTypeMixin, NodeNG):\n    \"\"\"This node represents a node in a constructed AST where\n    introspection is not possible.  At the moment, it's only used in\n    the args attribute of FunctionDef nodes where function signature\n    introspection failed.\n    \"\"\"\n\n    name = \"Unknown\"\n\n    def qname(self):\n        return \"Unknown\"\n\n    def _infer(self, context=None, **kwargs):\n        \"\"\"Inference on an Unknown node immediately terminates.\"\"\"\n        yield util.Uninferable\n\n\nclass EvaluatedObject(NodeNG):\n    \"\"\"Contains an object that has already been inferred\n\n    This class is useful to pre-evaluate a particular node,\n    with the resulting class acting as the non-evaluated node.\n    \"\"\"\n\n    name = \"EvaluatedObject\"\n    _astroid_fields = (\"original\",)\n    _other_fields = (\"value\",)\n\n    def __init__(\n        self, original: NodeNG, value: typing.Union[NodeNG, util.Uninferable]\n    ) -> None:\n        self.original: NodeNG = original\n        \"\"\"The original node that has already been evaluated\"\"\"\n\n        self.value: typing.Union[NodeNG, util.Uninferable] = value\n        \"\"\"The inferred value\"\"\"\n\n        super().__init__(\n            lineno=self.original.lineno,\n            col_offset=self.original.col_offset,\n            parent=self.original.parent,\n        )\n\n    def infer(self, context=None, **kwargs):\n        yield self.value\n\n\n# Pattern matching #######################################################\n\n\nclass Match(Statement):\n    \"\"\"Class representing a :class:`ast.Match` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case 200:\n            ...\n        case _:\n            ...\n    ''')\n    >>> node\n    <Match l.2 at 0x10c24e170>\n    \"\"\"\n\n    _astroid_fields = (\"subject\", \"cases\")\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        self.subject: NodeNG\n        self.cases: typing.List[\"MatchCase\"]\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        *,\n        subject: NodeNG,\n        cases: typing.List[\"MatchCase\"],\n    ) -> None:\n        self.subject = subject\n        self.cases = cases\n\n\nclass Pattern(NodeNG):\n    \"\"\"Base class for all Pattern nodes.\"\"\"\n\n\nclass MatchCase(mixins.MultiLineBlockMixin, NodeNG):\n    \"\"\"Class representing a :class:`ast.match_case` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case 200:\n            ...\n    ''')\n    >>> node.cases[0]\n    <MatchCase l.3 at 0x10c24e590>\n    \"\"\"\n\n    _astroid_fields = (\"pattern\", \"guard\", \"body\")\n    _multi_line_block_fields = (\"body\",)\n\n    lineno: None\n    col_offset: None\n\n    def __init__(self, *, parent: Optional[NodeNG] = None) -> None:\n        self.pattern: Pattern\n        self.guard: Optional[NodeNG]\n        self.body: typing.List[NodeNG]\n        super().__init__(parent=parent)\n\n    def postinit(\n        self,\n        *,\n        pattern: Pattern,\n        guard: Optional[NodeNG],\n        body: typing.List[NodeNG],\n    ) -> None:\n        self.pattern = pattern\n        self.guard = guard\n        self.body = body\n\n\nclass MatchValue(Pattern):\n    \"\"\"Class representing a :class:`ast.MatchValue` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case 200:\n            ...\n    ''')\n    >>> node.cases[0].pattern\n    <MatchValue l.3 at 0x10c24e200>\n    \"\"\"\n\n    _astroid_fields = (\"value\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        self.value: NodeNG\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, *, value: NodeNG) -> None:\n        self.value = value\n\n\nclass MatchSingleton(Pattern):\n    \"\"\"Class representing a :class:`ast.MatchSingleton` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case True:\n            ...\n        case False:\n            ...\n        case None:\n            ...\n    ''')\n    >>> node.cases[0].pattern\n    <MatchSingleton l.3 at 0x10c2282e0>\n    >>> node.cases[1].pattern\n    <MatchSingleton l.5 at 0x10c228af0>\n    >>> node.cases[2].pattern\n    <MatchSingleton l.7 at 0x10c229f90>\n    \"\"\"\n\n    _other_fields = (\"value\",)\n\n    def __init__(\n        self,\n        *,\n        value: Literal[True, False, None],\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        self.value: Literal[True, False, None] = value\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n\nclass MatchSequence(Pattern):\n    \"\"\"Class representing a :class:`ast.MatchSequence` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case [1, 2]:\n            ...\n        case (1, 2, *_):\n            ...\n    ''')\n    >>> node.cases[0].pattern\n    <MatchSequence l.3 at 0x10ca80d00>\n    >>> node.cases[1].pattern\n    <MatchSequence l.5 at 0x10ca80b20>\n    \"\"\"\n\n    _astroid_fields = (\"patterns\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        self.patterns: typing.List[Pattern]\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, *, patterns: typing.List[Pattern]) -> None:\n        self.patterns = patterns\n\n\nclass MatchMapping(mixins.AssignTypeMixin, Pattern):\n    \"\"\"Class representing a :class:`ast.MatchMapping` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case {1: \"Hello\", 2: \"World\", 3: _, **rest}:\n            ...\n    ''')\n    >>> node.cases[0].pattern\n    <MatchMapping l.3 at 0x10c8a8850>\n    \"\"\"\n\n    _astroid_fields = (\"keys\", \"patterns\", \"rest\")\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        self.keys: typing.List[NodeNG]\n        self.patterns: typing.List[Pattern]\n        self.rest: Optional[AssignName]\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        *,\n        keys: typing.List[NodeNG],\n        patterns: typing.List[Pattern],\n        rest: Optional[AssignName],\n    ) -> None:\n        self.keys = keys\n        self.patterns = patterns\n        self.rest = rest\n\n    assigned_stmts: Callable[\n        [\n            \"MatchMapping\",\n            AssignName,\n            Optional[InferenceContext],\n            Literal[None],\n        ],\n        Generator[NodeNG, None, None],\n    ]\n\n\nclass MatchClass(Pattern):\n    \"\"\"Class representing a :class:`ast.MatchClass` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case Point2D(0, 0):\n            ...\n        case Point3D(x=0, y=0, z=0):\n            ...\n    ''')\n    >>> node.cases[0].pattern\n    <MatchClass l.3 at 0x10ca83940>\n    >>> node.cases[1].pattern\n    <MatchClass l.5 at 0x10ca80880>\n    \"\"\"\n\n    _astroid_fields = (\"cls\", \"patterns\", \"kwd_patterns\")\n    _other_fields = (\"kwd_attrs\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        self.cls: NodeNG\n        self.patterns: typing.List[Pattern]\n        self.kwd_attrs: typing.List[str]\n        self.kwd_patterns: typing.List[Pattern]\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        *,\n        cls: NodeNG,\n        patterns: typing.List[Pattern],\n        kwd_attrs: typing.List[str],\n        kwd_patterns: typing.List[Pattern],\n    ) -> None:\n        self.cls = cls\n        self.patterns = patterns\n        self.kwd_attrs = kwd_attrs\n        self.kwd_patterns = kwd_patterns\n\n\nclass MatchStar(mixins.AssignTypeMixin, Pattern):\n    \"\"\"Class representing a :class:`ast.MatchStar` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case [1, *_]:\n            ...\n    ''')\n    >>> node.cases[0].pattern.patterns[1]\n    <MatchStar l.3 at 0x10ca809a0>\n    \"\"\"\n\n    _astroid_fields = (\"name\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        self.name: Optional[AssignName]\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, *, name: Optional[AssignName]) -> None:\n        self.name = name\n\n    assigned_stmts: Callable[\n        [\n            \"MatchStar\",\n            AssignName,\n            Optional[InferenceContext],\n            Literal[None],\n        ],\n        Generator[NodeNG, None, None],\n    ]\n\n\nclass MatchAs(mixins.AssignTypeMixin, Pattern):\n    \"\"\"Class representing a :class:`ast.MatchAs` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case [1, a]:\n            ...\n        case {'key': b}:\n            ...\n        case Point2D(0, 0) as c:\n            ...\n        case d:\n            ...\n    ''')\n    >>> node.cases[0].pattern.patterns[1]\n    <MatchAs l.3 at 0x10d0b2da0>\n    >>> node.cases[1].pattern.patterns[0]\n    <MatchAs l.5 at 0x10d0b2920>\n    >>> node.cases[2].pattern\n    <MatchAs l.7 at 0x10d0b06a0>\n    >>> node.cases[3].pattern\n    <MatchAs l.9 at 0x10d09b880>\n    \"\"\"\n\n    _astroid_fields = (\"pattern\", \"name\")\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        self.pattern: Optional[Pattern]\n        self.name: Optional[AssignName]\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(\n        self,\n        *,\n        pattern: Optional[Pattern],\n        name: Optional[AssignName],\n    ) -> None:\n        self.pattern = pattern\n        self.name = name\n\n    assigned_stmts: Callable[\n        [\n            \"MatchAs\",\n            AssignName,\n            Optional[InferenceContext],\n            Literal[None],\n        ],\n        Generator[NodeNG, None, None],\n    ]\n\n\nclass MatchOr(Pattern):\n    \"\"\"Class representing a :class:`ast.MatchOr` node.\n\n    >>> import astroid\n    >>> node = astroid.extract_node('''\n    match x:\n        case 400 | 401 | 402:\n            ...\n    ''')\n    >>> node.cases[0].pattern\n    <MatchOr l.3 at 0x10d0b0b50>\n    \"\"\"\n\n    _astroid_fields = (\"patterns\",)\n\n    def __init__(\n        self,\n        lineno: Optional[int] = None,\n        col_offset: Optional[int] = None,\n        parent: Optional[NodeNG] = None,\n    ) -> None:\n        self.patterns: typing.List[Pattern]\n        super().__init__(lineno=lineno, col_offset=col_offset, parent=parent)\n\n    def postinit(self, *, patterns: typing.List[Pattern]) -> None:\n        self.patterns = patterns\n\n\n# constants ##############################################################\n\nCONST_CLS = {\n    list: List,\n    tuple: Tuple,\n    dict: Dict,\n    set: Set,\n    type(None): Const,\n    type(NotImplemented): Const,\n    type(...): Const,\n}\n\n\ndef _update_const_classes():\n    \"\"\"update constant classes, so the keys of CONST_CLS can be reused\"\"\"\n    klasses = (bool, int, float, complex, str, bytes)\n    for kls in klasses:\n        CONST_CLS[kls] = Const\n\n\n_update_const_classes()\n\n\ndef _two_step_initialization(cls, value):\n    instance = cls()\n    instance.postinit(value)\n    return instance\n\n\ndef _dict_initialization(cls, value):\n    if isinstance(value, dict):\n        value = tuple(value.items())\n    return _two_step_initialization(cls, value)\n\n\n_CONST_CLS_CONSTRUCTORS = {\n    List: _two_step_initialization,\n    Tuple: _two_step_initialization,\n    Dict: _dict_initialization,\n    Set: _two_step_initialization,\n    Const: lambda cls, value: cls(value),\n}\n\n\ndef const_factory(value):\n    \"\"\"return an astroid node for a python value\"\"\"\n    # XXX we should probably be stricter here and only consider stuff in\n    # CONST_CLS or do better treatment: in case where value is not in CONST_CLS,\n    # we should rather recall the builder on this value than returning an empty\n    # node (another option being that const_factory shouldn't be called with something\n    # not in CONST_CLS)\n    assert not isinstance(value, NodeNG)\n\n    # Hack for ignoring elements of a sequence\n    # or a mapping, in order to avoid transforming\n    # each element to an AST. This is fixed in 2.0\n    # and this approach is a temporary hack.\n    if isinstance(value, (list, set, tuple, dict)):\n        elts = []\n    else:\n        elts = value\n\n    try:\n        initializer_cls = CONST_CLS[value.__class__]\n        initializer = _CONST_CLS_CONSTRUCTORS[initializer_cls]\n        return initializer(initializer_cls, elts)\n    except (KeyError, AttributeError):\n        node = EmptyNode()\n        node.object = value\n        return node\n\n\ndef is_from_decorator(node):\n    \"\"\"Return True if the given node is the child of a decorator\"\"\"\n    for parent in node.node_ancestors():\n        if isinstance(parent, Decorators):\n            return True\n    return False\n\n\ndef _get_if_statement_ancestor(node: NodeNG) -> Optional[If]:\n    \"\"\"Return the first parent node that is an If node (or None)\"\"\"\n    for parent in node.node_ancestors():\n        if isinstance(parent, If):\n            return parent\n    return None\n","header":{"file":{"path":"astroid/nodes/node_classes.py"},"misc_line":null},"index_line":null,"is_binary_file":false,"binary_line":null,"minus_file":{"path":"a/astroid/nodes/node_classes.py"},"plus_file":{"path":"b/astroid/nodes/node_classes.py"},"hunks":[{"descriptor":{"old_range":{"start":2346,"length":24},"new_range":{"start":2346,"length":33},"section":"def itered(self):"},"line_group":{"all_lines":[{"content":"        \"\"\"","type":"context"},{"content":"        return [key for (key, _) in self.items]","type":"context"},{"content":"","type":"context"},{"content":"    def getitem(self, index, context=None):","type":"deleted"},{"content":"    def getitem(","type":"added"},{"content":"        self, index: Const | Slice, context: InferenceContext | None = None","type":"added"},{"content":"    ) -> NodeNG:","type":"added"},{"content":"        \"\"\"Get an item from this node.","type":"context"},{"content":"","type":"context"},{"content":"        :param index: The node to use as a subscript index.","type":"context"},{"content":"        :type index: Const or Slice","type":"deleted"},{"content":"","type":"context"},{"content":"        :raises AstroidTypeError: When the given index cannot be used as a","type":"context"},{"content":"            subscript index, or if this node is not subscriptable.","type":"context"},{"content":"        :raises AstroidIndexError: If the given index does not exist in the","type":"context"},{"content":"            dictionary.","type":"context"},{"content":"        \"\"\"","type":"context"},{"content":"        # pylint: disable-next=import-outside-toplevel; circular import","type":"added"},{"content":"        from astroid.helpers import safe_infer","type":"added"},{"content":"","type":"added"},{"content":"        for key, value in self.items:","type":"context"},{"content":"            # TODO(cpopa): no support for overriding yet, {1:2, **{1: 3}}.","type":"context"},{"content":"            if isinstance(key, DictUnpack):","type":"context"},{"content":"                inferred_value = safe_infer(value, context)","type":"added"},{"content":"                if not isinstance(inferred_value, Dict):","type":"added"},{"content":"                    continue","type":"added"},{"content":"","type":"added"},{"content":"                try:","type":"context"},{"content":"                    return value.getitem(index, context)","type":"deleted"},{"content":"                    return inferred_value.getitem(index, context)","type":"added"},{"content":"                except (AstroidTypeError, AstroidIndexError):","type":"context"},{"content":"                    continue","type":"context"},{"content":"","type":"added"},{"content":"            for inferredkey in key.infer(context):","type":"context"},{"content":"                if inferredkey is util.Uninferable:","type":"context"},{"content":"                    continue","type":"context"},{"content":"","type":"context"}]},"modified_entities":[],"added_entities":[],"deleted_entities":[]}]}],"old_commit_hash":"39c2a9805970ca57093d32bbaf0e6a63e05041d8","new_commit_hash":"9b6ebb18f75f49da85fd3543b71ed532911b1ede","commit_message":"Update ChangeLog","commit_date":"2021-11-21T17:53:21+01:00","metadata":{}}