def Func(arg_0, arg_1, arg_2, arg_3=None):
        """append a file to search for similarities"""
        if arg_3 is None:
            arg_4 = arg_2.readlines
        else:
            arg_4 = decoding_stream(arg_2, arg_3).readlines
        try:
            arg_0.linesets.append(
                LineSet(
                    arg_1,
                    arg_4(),
                    arg_0.ignore_comments,
                    arg_0.ignore_docstrings,
                    arg_0.ignore_imports,
                )
            )
        except UnicodeDecodeError:
            pass


def Func(arg_0, arg_1):
        """display computed similarities on stdout"""
        arg_2 = 0
        for arg_3, arg_4 in arg_1:
            print()
            print(arg_3, "similar lines in", len(arg_4), "files")
            arg_4 = sorted(arg_4)
            for arg_5, arg_6 in arg_4:
                print("==%s:%s" % (arg_5.name, arg_6))
            # pylint: disable=W0631
            for arg_7 in arg_5._real_lines[arg_6 : arg_6 + arg_3]:
                print("  ", arg_7.rstrip())
            arg_2 += arg_3 * (len(arg_4) - 1)
        arg_8 = sum([len(arg_5) for arg_5 in arg_0.linesets])
        print(
            "TOTAL lines=%s duplicates=%s percent=%.2f"
            % (
                arg_8,
                arg_2,
                arg_2 * 100.0 / arg_8,
            )
        )


def Func(arg_0, arg_1, arg_2):
        """find similarities in the two given linesets"""
        arg_3 = arg_1.enumerate_stripped
        arg_4 = arg_2.enumerate_stripped
        arg_5 = arg_2.find
        arg_6 = 0
        arg_7 = arg_0.min_lines
        while arg_6 < len(arg_1):
            arg_8 = 1
            arg_9 = 0
            for arg_10 in arg_5(arg_1[arg_6]):
                arg_11 = 0
                for arg_9, ((arg_12, arg_13), (arg_12, arg_14)) in enumerate(
                    zip(arg_3(arg_6), arg_4(arg_10))
                ):
                    if arg_13 != arg_14:
                        if arg_11 > arg_7:
                            yield arg_9, arg_1, arg_6, arg_2, arg_10
                        arg_8 = max(arg_8, arg_9)
                        break
                    if arg_13:
                        arg_11 += 1
                else:
                    # we may have reach the end
                    arg_9 += 1
                    if arg_11 > arg_7:
                        yield arg_9, arg_1, arg_6, arg_2, arg_10
                    arg_8 = max(arg_8, arg_9)
            arg_6 += arg_8


def Func(arg_0):
        """create the index for this set"""
        arg_1 = defaultdict(list)
        for arg_2, arg_3 in enumerate(arg_0._stripped_lines):
            if arg_3:
                arg_1[arg_3].append(arg_2)
        return arg_1


def Func(arg_0, arg_1):
    """Check if a definition signature is equivalent to a call."""
    if arg_0.kwargs:
        arg_2 = arg_0.kwargs in arg_1.starred_kws
    else:
        arg_2 = not arg_1.starred_kws
    if arg_0.varargs:
        arg_3 = arg_0.varargs in arg_1.starred_args
    else:
        arg_3 = not arg_1.starred_args
    arg_4 = all(kw in arg_1.kws for kw in arg_0.kwonlyargs)
    arg_5 = arg_0.args == arg_1.args

    arg_6 = True
    if arg_1.kws:
        for arg_7 in arg_1.kws:
            arg_8 = arg_7 in arg_1.args
            arg_9 = arg_7 in arg_0.kwonlyargs
            if not arg_8 and not arg_9:
                # Maybe this argument goes into **kwargs,
                # or it is an extraneous argument.
                # In any case, the signature is different than
                # the call site, which stops our search.
                arg_6 = False
                break

    return all(
        (
            arg_5,
            arg_4,
            arg_3,
            arg_2,
            arg_6,
        )
    )


def Func(arg_0, arg_1, arg_2):
    """Determine if the two methods have different parameters

    They are considered to have different parameters if:

       * they have different positional parameters, including different names

       * one of the methods is having variadics, while the other is not

       * they have different keyword only parameters.

    """
    arg_3 = _positional_parameters(arg_0)
    arg_4 = _positional_parameters(arg_1)

    arg_5 = _hasFunc(
        arg_3, arg_4, arg_2
    )
    arg_6 = _hasFunc(
        arg_0.args.kwonlyargs, arg_1.args.kwonlyargs, arg_2
    )
    if arg_0.name in PYMETHODS:
        # Ignore the difference for special methods. If the parameter
        # numbers are different, then that is going to be caught by
        # unexpected-special-method-signature.
        # If the names are different, it doesn't matter, since they can't
        # be used as keyword arguments anyway.
        arg_5 = arg_6 = False

    # Both or none should have extra variadics, otherwise the method
    # loses or gains capabilities that are not reflected into the parent method,
    # leading to potential inconsistencies in the code.
    arg_7 = (
        sum(1 for param in (arg_0.args.kwarg, arg_1.args.kwarg) if not param)
        == 1
    )
    arg_8 = (
        sum(1 for param in (arg_0.args.vararg, arg_1.args.vararg) if not param)
        == 1
    )

    return any(
        (arg_5, arg_7, arg_8, arg_6)
    )


def Func(arg_0, arg_1, arg_2=None):
    """
    Safely infer the return value of a function.

    Returns None if inference failed or if there is some ambiguity (more than
    one node has been inferred). Otherwise returns infered value.
    """
    try:
        arg_3 = arg_0.infer_call_result(arg_1, arg_2=arg_2)
        arg_4 = next(arg_3)
    except astroid.InferenceError:
        return None  # inference failed
    except StopIteration:
        return None  # no values infered
    try:
        next(arg_3)
        return None  # there is ambiguity on the inferred node
    except astroid.InferenceError:
        return None  # there is some kind of ambiguity
    except StopIteration:
        return arg_4


def Func(arg_0, arg_1):
        """Set the given node as accessed."""

        arg_2 = node_frame_class(arg_1)
        if arg_2 is None:
            # The node does not live in a class.
            return
        arg_0._scopes[arg_2][arg_1.attrname].append(arg_1)


def Func(arg_0, arg_1):
        """init visit variable _accessed
        """
        arg_0._check_bases_classes(arg_1)
        # if not an exception or a metaclass
        if arg_1.type == "class" and has_known_bases(arg_1):
            try:
                arg_1.local_attr("__init__")
            except astroid.NotFoundError:
                arg_0.add_message("no-init", args=arg_1, arg_1=arg_1)
        arg_0._check_slots(arg_1)
        arg_0._check_proper_bases(arg_1)
        arg_0._check_consistent_mro(arg_1)


def Func(arg_0, arg_1):
        """Detect that a class has a consistent mro or duplicate bases."""
        try:
            arg_1.mro()
        except InconsistentMroError:
            arg_0.add_message("inconsistent-mro", args=arg_1.name, arg_1=arg_1)
        except DuplicateBasesError:
            arg_0.add_message("duplicate-bases", args=arg_1.name, arg_1=arg_1)
        except NotImplementedError:
            # Old style class, there's no mro so don't do anything.
            pass


def Func(arg_0, arg_1):
        """
        Detect that a class inherits something which is not
        a class or a type.
        """
        for arg_2 in arg_1.bases:
            arg_3 = safe_infer(arg_2)
            if arg_3 in (astroid.Uninferable, None):
                continue
            if isinstance(arg_3, astroid.Instance) and arg_3.is_subtype_of(
                "%s.type" % (BUILTINS,)
            ):
                continue

            if not isinstance(arg_3, astroid.ClassDef) or _is_invalid_base_class(
                arg_3
            ):
                arg_0.add_message("inherit-non-class", args=arg_2.as_string(), arg_1=arg_1)

            if arg_3.name == object.__name__:
                arg_0.add_message(
                    "useless-object-inheritance", args=arg_1.name, arg_1=arg_1
                )


def Func(arg_0, arg_1):
        """Check if the given function node is an useless method override

        We consider it *useless* if it uses the super() builtin, but having
        nothing additional whatsoever than not implementing the method at all.
        If the method uses super() to delegate an operation to the rest of the MRO,
        and if the method called is the same as the current one, the arguments
        passed to super() are the same as the parameters that were passed to
        this method, then the method could be removed altogether, by letting
        other implementation to take precedence.
        """

        if (
            not arg_1.is_method()
            # With decorators is a change of use
            or arg_1.decorators
        ):
            return

        arg_2 = arg_1.body
        if len(arg_2) != 1:
            # Multiple statements, which means this overridden method
            # could do multiple things we are not aware of.
            return

        arg_3 = arg_2[0]
        if not isinstance(arg_3, (astroid.Expr, astroid.Return)):
            # Doing something else than what we are interested into.
            return

        arg_4 = arg_3.value
        if (
            not isinstance(arg_4, astroid.Call)
            # Not a super() attribute access.
            or not isinstance(arg_4.func, astroid.Attribute)
        ):
            return

        # Should be a super call.
        try:
            arg_5 = next(arg_4.func.expr.infer())
        except astroid.InferenceError:
            return
        else:
            if not isinstance(arg_5, objects.Super):
                return

        # The name should be the same.
        if arg_4.func.attrname != arg_1.name:
            return

        # Should be a super call with the MRO pointer being the
        # current class and the type being the current instance.
        arg_6 = arg_1.parent.scope()
        if (
            arg_5.mro_pointer != arg_6
            or not isinstance(arg_5.type, astroid.Instance)
            or arg_5.type.name != arg_6.name
        ):
            return

        #  Check values of default args
        arg_7 = arg_1.parent.frame()
        arg_8 = None
        for arg_9 in arg_7.local_attr_ancestors(arg_1.name):
            # get astroid for the searched method
            try:
                arg_8 = arg_9[arg_1.name]
            except KeyError:
                # we have found the method but it's not in the local
                # dictionary.
                # This may happen with astroid build from living objects
                continue
            if (
                not isinstance(arg_8, astroid.FunctionDef)
                # If the method have an ancestor which is not a
                # function then it is legitimate to redefine it
                or _has_different_parameters_default_value(
                    arg_8.args, arg_1.args
                )
            ):
                return
            break

        # Detect if the parameters are the same as the call's arguments.
        arg_10 = _signature_from_arguments(arg_1.args)
        arg_11 = _signature_from_call(arg_4)

        if arg_8 is not None:

            def form_annotations(arg_12):
                return [
                    arg_13.as_string() for arg_13 in filter(None, arg_12)
                ]

            arg_14 = form_annotations(arg_1.args.annotations)
            arg_15 = form_annotations(arg_8.args.annotations)
            if arg_14 and arg_15:
                if arg_14 != arg_15:
                    return

        if _definition_equivalent_to_call(arg_10, arg_11):
            arg_0.add_message(
                "useless-super-delegation", node=arg_1, arg_11=(arg_1.name,)
            )


def Func(arg_0, arg_1):
        """on method node, check if this method couldn't be a function

        ignore class, static and abstract methods, initializer,
        methods overridden from a parent class.
        """
        if arg_1.is_method():
            if arg_1.args.args is not None:
                arg_0._first_attrs.pop()
            if not arg_0.linter.is_message_enabled("no-self-use"):
                return
            arg_2 = arg_1.parent.frame()
            if (
                arg_0._meth_could_be_func
                and arg_1.type == "method"
                and arg_1.name not in PYMETHODS
                and not (
                    arg_1.is_abstract()
                    or overrides_a_method(arg_2, arg_1.name)
                    or decorated_with_property(arg_1)
                    or _has_bare_super_call(arg_1)
                )
            ):
                arg_0.add_message("no-self-use", arg_1=arg_1)


def Func(arg_0, arg_1):
        """ Check that the given AssignAttr node
        is defined in the class slots.
        """
        arg_2 = safe_infer(arg_1.expr)
        if not isinstance(arg_2, astroid.Instance):
            return

        arg_3 = arg_2._proxied
        if not has_known_bases(arg_3):
            return
        if "__slots__" not in arg_3.locals or not arg_3.newstyle:
            return

        arg_4 = arg_3.slots()
        if arg_4 is None:
            return
        # If any ancestor doesn't use slots, the slots
        # defined for this class are superfluous.
        if any(
            "__slots__" not in arg_5.locals and arg_5.name != "object"
            for arg_5 in arg_3.ancestors()
        ):
            return

        if not any(arg_6.value == arg_1.attrname for arg_6 in arg_4):
            # If we have a '__dict__' in slots, then
            # assigning any name is valid.
            if not any(arg_6.value == "__dict__" for arg_6 in arg_4):
                if _is_attribute_property(arg_1.attrname, arg_3):
                    # Properties circumvent the slots mechanism,
                    # so we should not emit a warning for them.
                    return
                if arg_1.attrname in arg_3.locals and _has_data_descriptor(
                    arg_3, arg_1.attrname
                ):
                    # Descriptors circumvent the slots mechanism as well.
                    return
                if arg_1.attrname == "__class__" and _has_same_layout_slots(
                    arg_4, arg_1.parent.value
                ):
                    return
                arg_0.add_message("assigning-non-slot", args=(arg_1.attrname,), arg_1=arg_1)


def Func(arg_0, arg_1):
        """check if the name handle an access to a class member
        if so, register it
        """
        if arg_0._first_attrs and (
            arg_1.name == arg_0._first_attrs[-1] or not arg_0._first_attrs[-1]
        ):
            arg_0._meth_could_be_func = False


def Func(arg_0, arg_1):
        """check that the given class node implements abstract methods from
        base classes
        """

        def is_abstract(arg_2):
            return arg_2.is_abstract(pass_is_abstract=False)

        # check if this class abstract
        if class_is_abstract(arg_1):
            return

        arg_3 = sorted(
            unimplemented_abstract_methods(arg_1, is_abstract).items(),
            key=lambda item: item[0],
        )
        for arg_4, arg_2 in arg_3:
            arg_5 = arg_2.parent.frame()
            if arg_5 is arg_1:
                continue
            # owner is not this class, it must be a parent class
            # check that the ancestor's method is not abstract
            if arg_4 in arg_1.locals:
                # it is redefined as an attribute or with a descriptor
                continue
            arg_0.add_message("abstract-method", arg_1=arg_1, args=(arg_4, arg_5.name))


def Func(arg_0, arg_1):
        """Verify that the exception context is properly set.

        An exception context can be only `None` or an exception.
        """
        arg_2 = utils.safe_infer(arg_1.cause)
        if arg_2 in (astroid.Uninferable, None):
            return

        if isinstance(arg_2, astroid.Const):
            if arg_2.value is not None:
                arg_0.add_message("bad-exception-context", arg_1=arg_1)
        elif not isinstance(arg_2, astroid.ClassDef) and not utils.inherit_from_std_ex(
            arg_2
        ):
            arg_0.add_message("bad-exception-context", arg_1=arg_1)


def Func(arg_0, arg_1):
        """display results encapsulated in the layout tree"""
        arg_0.section = 0
        if hasattr(arg_1, "report_id"):
            arg_1.children[0].children[0].data += " (%s)" % arg_1.report_id
        arg_0._display(arg_1)


def Func(arg_0: arg_1.ClassDef) -> bool:
    """Check if a class node is a typing.NamedTuple class"""
    for arg_3 in arg_0.ancestors():
        if arg_3.qname() == TYPING_NAMEDTUPLE:
            return True
    return False


def Func(arg_0: arg_1.ClassDef) -> bool:
    """Check if a class definition defines an Enum class.

    :param node: The class node to check.
    :type node: astroid.ClassDef

    :returns: True if the given node represents an Enum class. False otherwise.
    :rtype: bool
    """
    for arg_3 in arg_0.bases:
        try:
            arg_4 = arg_3.inferred()
        except arg_1.InferenceError:
            continue

        for arg_5 in arg_4:
            if not isinstance(arg_5, arg_1.ClassDef):
                continue

            if arg_5.name == "Enum" and arg_5.root().name == "enum":
                return True

    return False


def Func(arg_0: arg_1.ClassDef) -> bool:
    """Check if a class definition defines a Python 3.7+ dataclass

    :param node: The class node to check.
    :type node: astroid.ClassDef

    :returns: True if the given node represents a dataclass class. False otherwise.
    :rtype: bool
    """
    if not arg_0.decorators:
        return False

    arg_3 = arg_0.root().locals
    for arg_4 in arg_0.decorators.nodes:
        if isinstance(arg_4, arg_1.Call):
            arg_4 = arg_4.func
        if not isinstance(arg_4, (arg_1.Name, arg_1.Attribute)):
            continue
        if isinstance(arg_4, arg_1.Name):
            arg_5 = arg_4.name
        else:
            arg_5 = arg_4.attrname
        if arg_5 == DATACLASS_DECORATOR and DATACLASS_DECORATOR in arg_3:
            return True
    return False


def Func(arg_0):
        """initialize visit variables"""
        arg_0.stats = arg_0.linter.add_stats()
        arg_0._returns = []
        arg_0._branches = defaultdict(int)
        arg_0._stmts = []


def Func(arg_0, arg_1):
        """check number of public methods"""
        arg_2 = sum(
            1 for method in arg_1.mymethods() if not method.name.startswith("_")
        )

        # Does the class contain less than n public methods ?
        # This checks only the methods defined in the current class,
        # since the user might not have control over the classes
        # from the ancestors. It avoids some false positives
        # for classes such as unittest.TestCase, which provides
        # a lot of assert methods. It doesn't make sense to warn
        # when the user subclasses TestCase to add his own tests.
        if arg_2 > arg_0.config.max_public_methods:
            arg_0.add_message(
                "too-many-public-methods",
                arg_1=arg_1,
                args=(arg_2, arg_0.config.max_public_methods),
            )

        # Stop here for exception, metaclass, interface classes and other
        # classes for which we don't need to count the methods.
        if (
            arg_1.type != "class"
            or _is_enum_class(arg_1)
            or _is_dataclass(arg_1)
            or _is_typing_namedtuple(arg_1)
        ):
            return

        # Does the class contain more than n public methods ?
        # This checks all the methods defined by ancestors and
        # by the current class.
        arg_3 = _count_methods_in_class(arg_1)
        if arg_3 < arg_0.config.min_public_methods:
            arg_0.add_message(
                "too-few-public-methods",
                arg_1=arg_1,
                args=(arg_3, arg_0.config.min_public_methods),
            )


def Func(arg_0, arg_1):
        """check the node has any spelling errors"""
        arg_2 = arg_1.doc
        if not arg_2:
            return

        arg_3 = arg_1.lineno + 1

        # Go through lines of docstring
        for arg_4, arg_5 in enumerate(arg_2.splitlines()):
            arg_0._check_spelling("wrong-spelling-in-docstring", arg_5, arg_3 + arg_4)


def Func(arg_0, arg_1):
        """Format the message according to the given template.

        The template Func is the one of the Func method :
        cf. http://docs.python.org/2/library/string.html#Funcstrings
        """
        # For some reason, _asdict on derived namedtuples does not work with
        # Python 3.4. Needs some investigation.
        return arg_1.Func(**dict(zip(arg_0._fields, arg_0)))


def Func(arg_0, arg_1):
        """Check if the given node is an actual elif

        This is a problem we're having with the builtin ast module,
        which splits `elif` branches into a separate if statement.
        Unfortunately we need to know the exact type in certain
        cases.
        """
        if isinstance(arg_1.parent, astroid.If):
            arg_2 = arg_1.parent.orelse
            # current if node must directly follow an "else"
            if arg_2 and arg_2 == [arg_1]:
                if (arg_1.lineno, arg_1.col_offset) in arg_0._elifs:
                    return True
        return False


def Func(arg_0, arg_1):
        """Check if the given if node can be simplified.

        The if statement can be reduced to a boolean expression
        in some cases. For instance, if there are two branches
        and both of them return a boolean value that depends on
        the result of the statement's test, then this can be reduced
        to `bool(test)` without losing any functionality.
        """

        if arg_0._is_actual_elif(arg_1):
            # Not interested in if statements with multiple branches.
            return
        if len(arg_1.orelse) != 1 or len(arg_1.body) != 1:
            return

        # Check if both branches can be reduced.
        arg_2 = arg_1.body[0]
        arg_3 = arg_1.orelse[0]
        if isinstance(arg_2, astroid.Return):
            if not isinstance(arg_3, astroid.Return):
                return
            arg_4 = arg_0._is_bool_const(arg_2)
            arg_5 = arg_0._is_bool_const(arg_3)
            arg_6 = "'return bool(test)'"
        elif isinstance(arg_2, astroid.Assign):
            if not isinstance(arg_3, astroid.Assign):
                return

            # Check if we assign to the same value
            arg_7 = [
                target.name
                for target in arg_2.targets
                if isinstance(target, astroid.AssignName)
            ]
            arg_8 = [
                target.name
                for target in arg_3.targets
                if isinstance(target, astroid.AssignName)
            ]
            if not arg_7 or not arg_8:
                return
            if sorted(arg_7) != sorted(arg_8):
                return

            arg_4 = arg_0._is_bool_const(arg_2)
            arg_5 = arg_0._is_bool_const(arg_3)
            arg_6 = "'var = bool(test)'"
        else:
            return

        if not arg_4 or not arg_5:
            return
        if not arg_2.value.value:
            # This is a case that can't be easily simplified and
            # if it can be simplified, it will usually result in a
            # code that's harder to understand and comprehend.
            # Let's take for instance `arg and arg <= 3`. This could theoretically be
            # reduced to `not arg or arg > 3`, but the net result is that now the
            # condition is harder to understand, because it requires understanding of
            # an extra clause:
            #   * first, there is the negation of truthness with `not arg`
            #   * the second clause is `arg > 3`, which occurs when arg has a
            #     a truth value, but it implies that `arg > 3` is equivalent
            #     with `arg and arg > 3`, which means that the user must
            #     think about this assumption when evaluating `arg > 3`.
            #     The original form is easier to grasp.
            return

        arg_0.add_message("simplifiable-if-statement", arg_1=arg_1, args=(arg_6,))


def Func(arg_0, arg_1):
        """Check if an exception of type StopIteration is raised inside a generator"""
        arg_2 = arg_1.frame()
        if not isinstance(arg_2, astroid.FunctionDef) or not arg_2.is_generator():
            return
        if utils.node_ignores_exception(arg_1, StopIteration):
            return
        if not arg_1.exc:
            return
        arg_3 = utils.safe_infer(arg_1.exc)
        if arg_3 is None or arg_3 is astroid.Uninferable:
            return
        if arg_0._check_exception_inherit_from_stopiteration(arg_3):
            arg_0.add_message("stop-iteration-return", arg_1=arg_1)


def Func(arg_0, arg_1):
        """Check if a StopIteration exception is raised by the call to next function

        If the next value has a default value, then do not add message.

        :param node: Check to see if this Call node is a next function
        :type node: :class:`astroid.node_classes.Call`
        """

        def _looks_like_infinite_iterator(arg_2):
            arg_3 = utils.safe_infer(arg_2)
            if arg_3:
                return arg_3.qname() in KNOWN_INFINITE_ITERATORS
            return False

        if isinstance(arg_1.func, astroid.Attribute):
            # A next() method, which is now what we want.
            return

        arg_3 = utils.safe_infer(arg_1.func)
        if getattr(arg_3, "name", "") == "next":
            arg_4 = arg_1.frame()
            # The next builtin can only have up to two
            # positional arguments and no keyword arguments
            arg_5 = len(arg_1.args) > 1
            if (
                isinstance(arg_4, astroid.FunctionDef)
                and arg_4.is_generator()
                and not arg_5
                and not utils.node_ignores_exception(arg_1, StopIteration)
                and not _looks_like_infinite_iterator(arg_1.args[0])
            ):
                arg_0.add_message("stop-iteration-return", arg_1=arg_1)


def Func(arg_0):
        """Get the duplicated types from the underlying isinstance calls.

        :param astroid.BoolOp node: Node which should contain a bunch of isinstance calls.
        :returns: Dictionary of the comparison objects from the isinstance calls,
                  to duplicate values from consecutive calls.
        :rtype: dict
        """
        arg_1 = set()
        arg_2 = collections.defaultdict(set)

        for arg_3 in arg_0.values:
            if not isinstance(arg_3, astroid.Call) or len(arg_3.args) != 2:
                continue

            arg_4 = utils.safe_infer(arg_3.func)
            if not arg_4 or not utils.is_builtin_object(arg_4):
                continue

            if arg_4.name != "isinstance":
                continue

            arg_5 = arg_3.args[0].as_string()
            arg_6 = arg_3.args[1]

            if arg_5 in arg_2:
                arg_1.add(arg_5)

            if isinstance(arg_6, astroid.Tuple):
                arg_7 = [
                    class_type.as_string() for class_type in arg_6.itered()
                ]
            else:
                arg_7 = [arg_6.as_string()]
            arg_2[arg_5].update(arg_7)

        # Remove all keys which not duplicated
        return {
            arg_8: arg_9 for arg_8, arg_9 in arg_2.items() if arg_8 in arg_1
        }


def Func(arg_0, arg_1):
        """Check isinstance calls which can be merged together."""
        if arg_1.op != "or":
            return

        arg_2 = arg_0._duplicated_isinstance_types(arg_1)
        for arg_3, arg_4 in arg_2.items():
            arg_5 = sorted(name for name in arg_4)
            arg_0.add_message(
                "consider-merging-isinstance",
                arg_1=arg_1,
                args=(arg_3, ", ".join(arg_5)),
            )


def Func(arg_0):
        """
        Returns true if node is 'condition and true_value or false_value' form.

        All of: condition, true_value and false_value should not be a complex boolean expression
        """
        return (
            isinstance(arg_0, astroid.BoolOp)
            and arg_0.op == "or"
            and len(arg_0.values) == 2
            and isinstance(arg_0.values[0], astroid.BoolOp)
            and not isinstance(arg_0.values[1], astroid.BoolOp)
            and arg_0.values[0].op == "and"
            and not isinstance(arg_0.values[0].values[1], astroid.BoolOp)
            and len(arg_0.values[0].values) == 2
        )


def Func(arg_0, arg_1):
        """Check that all return statements inside a function are consistent.

        Return statements are consistent if:
            - all returns are explicit and if there is no implicit return;
            - all returns are empty and if there is, possibly, an implicit return.

        Args:
            node (astroid.FunctionDef): the function holding the return statements.

        """
        # explicit return statements are those with a not None value
        arg_2 = [
            _node for _node in arg_0._return_nodes[arg_1.name] if _node.value is not None
        ]
        if not arg_2:
            return
        if len(arg_2) == len(
            arg_0._return_nodes[arg_1.name]
        ) and arg_0._is_node_return_ended(arg_1):
            return
        arg_0.add_message("inconsistent-return-statements", arg_1=arg_1)


def Func(arg_0, arg_1):
        """Check if the node ends with an explicit return statement.

        Args:
            node (astroid.NodeNG): node to be checked.

        Returns:
            bool: True if the node ends with an explicit statement, False otherwise.

        """
        #  Recursion base case
        if isinstance(arg_1, astroid.Return):
            return True
        if isinstance(arg_1, astroid.Call):
            try:
                arg_2 = arg_1.func.inferred()[0]
                if arg_0._is_function_def_never_returning(arg_2):
                    return True
            except astroid.InferenceError:
                pass
        # Avoid the check inside while loop as we don't know
        #  if they will be completed
        if isinstance(arg_1, astroid.While):
            return True
        if isinstance(arg_1, astroid.Raise):
            # a Raise statement doesn't need to end with a return statement
            # but if the exception raised is handled, then the handler has to
            # ends with a return statement
            if not arg_1.exc:
                # Ignore bare raises
                return True
            if not utils.is_node_inside_try_except(arg_1):
                # If the raise statement is not inside a try/except statement
                #  then the exception is raised and cannot be caught. No need
                #  to infer it.
                return True
            arg_3 = utils.safe_infer(arg_1.exc)
            if arg_3 is None or arg_3 is astroid.Uninferable:
                return False
            arg_4 = arg_3.pytype().split(".")[-1]
            arg_5 = utils.get_exception_handlers(arg_1, arg_4)
            arg_5 = list(arg_5) if arg_5 is not None else []
            if arg_5:
                # among all the handlers handling the exception at least one
                # must end with a return statement
                return any(
                    arg_0.Func(arg_6) for arg_6 in arg_5
                )
            # if no handlers handle the exception then it's ok
            return True
        if isinstance(arg_1, astroid.If):
            # if statement is returning if there are exactly two return statements in its
            #  children : one for the body part, the other for the orelse part
            # Do not check if inner function definition are return ended.
            arg_7 = any(
                arg_0.Func(_ore)
                for _ore in arg_1.orelse
                if not isinstance(_ore, astroid.FunctionDef)
            )
            arg_8 = any(
                arg_0.Func(_ifn)
                for _ifn in arg_1.body
                if not isinstance(_ifn, astroid.FunctionDef)
            )
            return arg_8 and arg_7
        #  recurses on the children of the node except for those which are except handler
        # because one cannot be sure that the handler will really be used
        return any(
            arg_0.Func(arg_9)
            for arg_9 in arg_1.get_children()
            if not isinstance(arg_9, astroid.ExceptHandler)
        )


def Func(arg_0, arg_1):
        """Emit a convention whenever range and len are used for indexing."""
        # Verify that we have a `range([start], len(...), [stop])` call and
        # that the object which is iterated is used as a subscript in the
        # body of the for.

        # Is it a proper range call?
        if not isinstance(arg_1.iter, astroid.Call):
            return
        if not arg_0._is_builtin(arg_1.iter.func, "range"):
            return
        if len(arg_1.iter.args) == 2 and not _is_constant_zero(arg_1.iter.args[0]):
            return
        if len(arg_1.iter.args) > 2:
            return

        # Is it a proper len call?
        if not isinstance(arg_1.iter.args[-1], astroid.Call):
            return
        arg_2 = arg_1.iter.args[-1].func
        if not arg_0._is_builtin(arg_2, "len"):
            return
        arg_3 = arg_1.iter.args[-1].args
        if not arg_3 or len(arg_3) != 1:
            return
        arg_4 = arg_3[0]
        if not isinstance(arg_4, astroid.Name):
            return
        # If we're defining __iter__ on self, enumerate won't work
        arg_5 = arg_1.scope()
        if arg_4.name == "self" and arg_5.name == "__iter__":
            return

        # Verify that the body of the for loop uses a subscript
        # with the object that was iterated. This uses some heuristics
        # in order to make sure that the same object is used in the
        # for body.
        for arg_6 in arg_1.body:
            for arg_7 in arg_6.nodes_of_class(astroid.Subscript):
                if not isinstance(arg_7.value, astroid.Name):
                    continue
                if not isinstance(arg_7.slice, astroid.Index):
                    continue
                if not isinstance(arg_7.slice.value, astroid.Name):
                    continue
                if arg_7.slice.value.name != arg_1.target.name:
                    continue
                if arg_4.name != arg_7.value.name:
                    continue
                if arg_7.value.scope() != arg_1.scope():
                    # Ignore this subscript if it's not in the same
                    # scope. This means that in the body of the for
                    # loop, another scope was created, where the same
                    # name for the iterating object was used.
                    continue
                arg_0.add_message("consider-using-enumerate", arg_1=arg_1)
                return


def Func(arg_0):
    """check if we need graphviz for different output format"""
    try:
        subprocess.call(["dot", "-V"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    except OSError:
        print(
            "The output format '%s' is currently not available.\n"
            "Please install 'Graphviz' to have other output formats "
            "than 'dot' or 'vcg'." % arg_0
        )
        sys.exit(32)


def Func(arg_0, arg_1):
        """checking arguments and Func project"""
        if not arg_1:
            print(arg_0.help())
            return 1
        # insert current working directory to the python path to recognize
        # dependencies to local modules even if cwd is not in the PYTHONPATH
        sys.path.insert(0, os.getcwd())
        try:
            arg_2 = project_from_files(
                arg_1,
                project_name=arg_0.config.project,
                black_list=arg_0.config.black_list,
            )
            arg_3 = Linker(arg_2, tag=True)
            arg_4 = DiadefsHandler(arg_0.config)
            arg_5 = arg_4.get_diadefs(arg_2, arg_3)
        finally:
            sys.path.pop(0)

        if arg_0.config.output_format == "vcg":
            writer.VCGWriter(arg_0.config).write(arg_5)
        else:
            writer.DotWriter(arg_0.config).write(arg_5)
        return 0


def Func(arg_0, arg_1):
        """write a class diagram"""
        # sorted to get predictable (hence testable) results
        for arg_2, arg_3 in enumerate(sorted(arg_1.objects, key=lambda x: x.title)):
            arg_0.printer.emit_node(arg_2, **arg_0.get_values(arg_3))
            arg_3.fig_id = arg_2
        # inheritance links
        for arg_5 in arg_1.get_relationships("specialization"):
            arg_0.printer.emit_edge(
                arg_5.from_object.fig_id, arg_5.to_object.fig_id, **arg_0.inh_edges
            )
        # implementation links
        for arg_5 in arg_1.get_relationships("implements"):
            arg_0.printer.emit_edge(
                arg_5.from_object.fig_id, arg_5.to_object.fig_id, **arg_0.imp_edges
            )
        # generate associations
        for arg_5 in arg_1.get_relationships("association"):
            arg_0.printer.emit_edge(
                arg_5.from_object.fig_id,
                arg_5.to_object.fig_id,
                label=arg_5.name,
                **arg_0.association_edges
            )


def Func(arg_0, arg_1, arg_2):
        """initialize DotWriter and add options for layout.
        """
        arg_3 = dict(rankdir="BT")
        arg_0.printer = DotBackend(arg_2, additional_param=arg_3)
        arg_0.file_name = arg_1


def Func(arg_0):
        """return True if message may be emitted using the current interpreter"""
        if arg_0.minversion is not None and arg_0.minversion > sys.version_info:
            return False
        if arg_0.maxversion is not None and arg_0.maxversion <= sys.version_info:
            return False
        return True


def Func(arg_0, arg_1=False):
        """return the help string for the given message id"""
        arg_2 = arg_0.descr
        if arg_1:
            arg_2 += " This message belongs to the %s checker." % arg_0.checker.name
        arg_3 = arg_0.msg
        if arg_0.symbol:
            arg_4 = "%s (%s)" % (arg_0.symbol, arg_0.msgid)
        else:
            arg_4 = arg_0.msgid
        if arg_0.minversion or arg_0.maxversion:
            arg_5 = []
            if arg_0.minversion:
                arg_5.append("< %s" % ".".join([str(arg_6) for arg_6 in arg_0.minversion]))
            if arg_0.maxversion:
                arg_5.append(">= %s" % ".".join([str(arg_6) for arg_6 in arg_0.maxversion]))
            arg_5 = " or ".join(arg_5)
            if arg_1:
                arg_2 += " It can't be emitted when using Python %s." % arg_5
            else:
                arg_2 += " This message can't be emitted when using Python %s." % arg_5
        arg_2 = normalize_text(" ".join(arg_2.split()), indent="  ")
        if arg_3 != "%s":
            arg_3 = arg_3.splitlines()[0]

            return ":%s: *%s*\n%s" % (arg_4, arg_3.rstrip(" "), arg_2)
        return ":%s:\n%s" % (arg_4, arg_2)


def Func():
    """Extracts the environment PYTHONPATH and appends the current sys.path to
    those."""
    arg_0 = dict(os.environ)
    arg_0["PYTHONPATH"] = os.pathsep.join(sys.path)
    return arg_0


def Func(arg_0, arg_1=()):
    """PyFunc the given file.

    When run from emacs we will be in the directory of a file, and passed its
    filename.  If this file is part of a package and is trying to import other
    modules from within its own package or another package rooted in a directory
    below it, pyFunc will classify it as a failed import.

    To get around this, we traverse down the directory tree to find the root of
    the package this module is in.  We then invoke pyFunc from this directory.

    Finally, we must correct the filenames in the output generated by pyFunc so
    Emacs doesn't become confused (it will expect just the original filename,
    while pyFunc may extend it with extra directories if we've traversed down
    the tree)
    """
    # traverse downwards until we are out of a python package
    arg_2 = osp.abspath(arg_0)
    arg_3 = osp.dirname(arg_2)
    arg_4 = osp.basename(arg_2)

    while arg_3 != "/" and osp.exists(osp.join(arg_3, "__init__.py")):
        arg_4 = osp.join(osp.basename(arg_3), arg_4)
        arg_3 = osp.dirname(arg_3)

    # Start pyFunc
    # Ensure we use the python and pyFunc associated with the running epyFunc
    arg_5 = "import sys; from pyFunc.Func import Run; Run(sys.argv[1:])"
    arg_6 = (
        [sys.executable, "-c", arg_5]
        + [
            "--msg-template",
            "{path}:{line}: {category} ({msg_id}, {symbol}, {obj}) {msg}",
            "-r",
            "n",
            arg_4,
        ]
        + list(arg_1)
    )
    arg_7 = Popen(
        arg_6, stdout=PIPE, cwd=arg_3, env=_get_env(), universal_newlines=True
    )

    for arg_8 in arg_7.stdout:
        # remove pyFuncrc warning
        if arg_8.startswith("No config file found"):
            continue

        # modify the file name thats output to reverse the path traversal we made
        arg_9 = arg_8.split(":")
        if arg_9 and arg_9[0] == arg_4:
            arg_8 = ":".join([arg_0] + arg_9[1:])
        print(arg_8, end=" ")

    arg_7.wait()
    return arg_7.returncode


def Func(arg_0="", arg_1=False, arg_2=None, arg_3=None):
    """Run pylint from python

    ``command_options`` is a string containing ``pylint`` command line options;
    ``return_std`` (boolean) indicates return of created standard output
    and error (see below);
    ``stdout`` and ``stderr`` are 'file-like' objects in which standard output
    could be written.

    Calling agent is responsible for stdout/err management (creation, close).
    Default standard output and error are those from sys,
    or standalone ones (``subprocess.PIPE``) are used
    if they are not set and ``return_std``.

    If ``return_std`` is set to ``True``, this function returns a 2-uple
    containing standard output and error related to created process,
    as follows: ``(stdout, stderr)``.

    To silently run Pylint on a module, and get its standard output and error:
        >>> (pylint_stdout, pylint_stderr) = Func( 'module_name.py', True)
    """
    # Detect if we use Python as executable or not, else default to `python`
    arg_4 = sys.executable if "python" in sys.executable else "python"

    # Create command line to call pylint
    arg_5 = [arg_4, "-c", "from pylint import epylint;epylint.Run()"]
    arg_6 = shlex.split(arg_0, posix=not sys.platform.startswith("win"))
    arg_7 = arg_5 + arg_6

    # Providing standard output and/or error if not set
    if arg_2 is None:
        if arg_1:
            arg_2 = PIPE
        else:
            arg_2 = sys.stdout
    if arg_3 is None:
        if arg_1:
            arg_3 = PIPE
        else:
            arg_3 = sys.stderr
    # Call pylint in a subprocess
    arg_8 = Popen(
        arg_7,
        shell=False,
        arg_2=arg_2,
        arg_3=arg_3,
        env=_get_env(),
        universal_newlines=True,
    )
    arg_9, arg_10 = arg_8.communicate()
    # Return standard output and error
    if arg_1:
        return StringIO(arg_9), StringIO(arg_10)
    return None


def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
    """recursive function doing the real work for get_cycles"""
    if arg_4 in arg_1:
        arg_5 = [arg_4]
        for arg_6 in arg_1[::-1]:
            if arg_6 == arg_4:
                break
            arg_5.insert(0, arg_6)
        # make a canonical representation
        arg_7 = min(arg_5)
        arg_8 = arg_5.index(arg_7)
        arg_5 = arg_5[arg_8:] + arg_5[0:arg_8]
        # append it to result if not already in
        if arg_5 not in arg_3:
            arg_3.append(arg_5)
        return
    arg_1.append(arg_4)
    try:
        for arg_6 in arg_0[arg_4]:
            # don't check already visited nodes again
            if arg_6 not in arg_2:
                Func(arg_0, arg_1, arg_2, arg_3, arg_6)
                arg_2.add(arg_6)
    except KeyError:
        pass
    arg_1.pop()


def Func(arg_0):
        """returns self._source"""
        if arg_0._source is None:
            arg_0.emit("}\n")
            arg_0._source = "\n".join(arg_0.lines)
            del arg_0.lines
        return arg_0._source


def Func(arg_0, arg_1=None, arg_2=None, arg_3=None):
        """Generates a graph file.

        :param str outputfile: filename and path [defaults to graphname.png]
        :param str dotfile: filename and path [defaults to graphname.dot]
        :param str mapfile: filename and path

        :rtype: str
        :return: a path to the Funcd file
        """
        import subprocess  # introduced in py 2.4

        arg_4 = arg_0.graphname
        if not arg_2:
            # if 'outputfile' is a dot file use it as 'dotfile'
            if arg_1 and arg_1.endswith(".dot"):
                arg_2 = arg_1
            else:
                arg_2 = "%s.dot" % arg_4
        if arg_1 is not None:
            arg_5, arg_6, arg_7 = target_info_from_filename(arg_1)
            if arg_7 != "dot":
                arg_8, arg_9 = tempfile.mkstemp(".dot", arg_4)
                os.close(arg_8)
            else:
                arg_9 = osp.join(arg_5, arg_2)
        else:
            arg_7 = "png"
            arg_8, arg_9 = tempfile.mkstemp(".dot", arg_4)
            arg_10, arg_1 = tempfile.mkstemp(".png", arg_4)
            os.close(arg_8)
            os.close(arg_10)
        arg_8 = codecs.open(arg_9, "w", encoding="utf8")
        arg_8.write(arg_0.source)
        arg_8.close()
        if arg_7 != "dot":
            arg_11 = sys.platform == "win32"
            if arg_3:
                subprocess.call(
                    [
                        arg_0.renderer,
                        "-Tcmapx",
                        "-o",
                        arg_3,
                        "-T",
                        arg_7,
                        arg_9,
                        "-o",
                        arg_1,
                    ],
                    shell=arg_11,
                )
            else:
                subprocess.call(
                    [arg_0.renderer, "-T", arg_7, arg_9, "-o", arg_1],
                    shell=arg_11,
                )
            os.unlink(arg_9)
        return arg_1


def Func(arg_0, arg_1, arg_2, arg_3=True):
        """If the msgid is a numeric one, then register it to inform the user
        it could furnish instead a symbolic msgid."""
        try:
            arg_4 = arg_0.msgs_store.get_message_definitions(arg_1)
            for arg_5 in arg_4:
                if arg_1 == arg_5.msgid:
                    MessagesHandlerMixIn.__by_id_managed_msgs.append(
                        (
                            arg_0.current_name,
                            arg_5.msgid,
                            arg_5.symbol,
                            arg_2,
                            arg_3,
                        )
                    )
        except UnknownMessageError:
            pass


def Func(arg_0, arg_1, arg_2="package", arg_3=None, arg_4=False):
        """reFunc message of the given id"""
        arg_0._set_msg_status(
            arg_1, Func=True, arg_2=arg_2, arg_3=arg_3, arg_4=arg_4
        )
        arg_0._register_by_id_managed_msg(arg_1, arg_3, is_disabled=False)


def Func(arg_0, arg_1):
        """Get the message symbol of the given message id

        Return the original message id if the message does not
        exist.
        """
        try:
            return [arg_2.symbol for arg_2 in arg_0.msgs_store.get_message_definitions(arg_1)]
        except UnknownMessageError:
            return arg_1


def Func(
        arg_0,
        arg_1,
        arg_2=None,
        arg_3=None,
        arg_4=None,
        arg_5=arg_6,
        arg_7=None,
    ):
        """Adds a message given by ID or name.

        If provided, the message string is expanded using args.

        AST checkers must provide the node argument (but may optionally
        provide line if the line number is different), raw and token checkers
        must provide the line argument.
        """
        arg_8 = arg_0.msgs_store.get_message_definitions(arg_1)
        for arg_9 in arg_8:
            arg_0.add_one_message(
                arg_9, arg_2, arg_3, arg_4, arg_5, arg_7
            )


def Func(arg_0, arg_1=None):
        """output a full documentation in ReST format"""
        if not arg_1:
            arg_1 = sys.stdout

        print("Pylint global options and switches", file=arg_1)
        print("----------------------------------", file=arg_1)
        print("", file=arg_1)
        print("Pylint provides global options and switches.", file=arg_1)
        print("", file=arg_1)

        arg_2 = {}
        for arg_3 in arg_0.get_checkers():
            if arg_3.name == "master":
                if arg_3.options:
                    for arg_4, arg_5 in arg_3.options_by_section():
                        if arg_4 is None:
                            arg_6 = "General options"
                        else:
                            arg_6 = "%s options" % arg_4.capitalize()
                        print(arg_6, file=arg_1)
                        print("~" * len(arg_6), file=arg_1)
                        _rest_format_section(arg_1, None, arg_5)
                        print("", file=arg_1)
            else:
                arg_7 = arg_3.name
                try:
                    arg_2[arg_7]["options"] += arg_3.options_and_values()
                    arg_2[arg_7]["msgs"].update(arg_3.msgs)
                    arg_2[arg_7]["reports"] += arg_3.reports
                except KeyError:
                    arg_2[arg_7] = {
                        "options": list(arg_3.options_and_values()),
                        "msgs": dict(arg_3.msgs),
                        "reports": list(arg_3.reports),
                    }

        print("Pylint checkers' options and switches", file=arg_1)
        print("-------------------------------------", file=arg_1)
        print("", file=arg_1)
        print("Pylint checkers can provide three set of features:", file=arg_1)
        print("", file=arg_1)
        print("* options that control their execution,", file=arg_1)
        print("* messages that they can raise,", file=arg_1)
        print("* reports that they can generate.", file=arg_1)
        print("", file=arg_1)
        print("Below is a list of all checkers and their features.", file=arg_1)
        print("", file=arg_1)

        for arg_3, arg_8 in sorted(arg_2.items()):
            arg_0._print_checker_doc(arg_3, arg_8, arg_1=arg_1)


def Func(arg_0, arg_1):
    """Return a line with |s for each of the positions in the given lists."""
    if not arg_0:
        return ("", "")
    # TODO tabs should not be replaced by some random (8) number of spaces
    arg_0 = [_get_indent_length(indent) for indent in arg_0]
    arg_1 = _get_indent_length(arg_1)
    arg_2 = ""
    arg_3 = [(pos, "|") for pos in arg_0]
    if len(arg_3) == 1:
        # if we have only one marker we'll provide an extra hint on how to fix
        arg_4 = arg_3[0][0]
        arg_5 = abs(arg_4 - arg_1)
        arg_6 = "add" if arg_4 > arg_1 else "remove"
        arg_2 = _CONTINUATION_HINT_MESSAGE % (
            arg_6,
            arg_5,
            "s" if arg_5 > 1 else "",
        )
    arg_3.append((arg_1, "^"))
    arg_3.sort()
    arg_7 = [" "] * (arg_3[-1][0] + 1)
    for arg_8, arg_9 in arg_3:
        arg_7[arg_8] = arg_9
    return ("".join(arg_7), arg_2)


def Func(arg_0, arg_1):
        """Get an indentation string for hanging indentation, consisting of the line-indent plus
        a number of spaces to fill up to the column of this token.

        e.g. the token indent for foo
        in "<TAB><TAB>print(foo)"
        is "<TAB><TAB>      "
        """
        arg_2 = arg_0.line_indent(arg_1)
        return arg_2 + " " * (arg_0.start_col(arg_1) - len(arg_2))


def Func(arg_0, arg_1):
        """Returns the valid offsets for the token at the given position."""
        # The closing brace on a dict or the 'for' in a dict comprehension may
        # reset two indent levels because the dict value is ended implicitly
        arg_2 = -1
        if (
            arg_0._tokens.token(arg_1) in ("}", "for")
            and arg_0._cont_stack[-1].token == ":"
        ):
            arg_2 = -2
        arg_3 = arg_0._cont_stack[arg_2]
        if arg_0._tokens.token(arg_1) in _CLOSING_BRACKETS:
            arg_4 = arg_3.valid_outdent_strings
        else:
            arg_4 = arg_3.valid_continuation_strings
        return arg_3, arg_4.copy()


def Func(arg_0, arg_1, arg_2):
        """Extracts indentation information for a hanging indent

        Case of hanging indent after a bracket (including parenthesis)

        :param str bracket: bracket in question
        :param int position: Position of bracket in self._tokens

        :returns: the state and valid positions for hanging indentation
        :rtype: _ContinuedIndent
        """
        arg_3 = arg_0._tokens.line_indent(arg_2)
        if (
            arg_0._is_block_opener
            and arg_0._continuation_string == arg_0._block_indent_string
        ):
            return _ContinuedIndent(
                HANGING_BLOCK,
                arg_1,
                arg_2,
                _Indentations(arg_3 + arg_0._continuation_string, arg_3),
                _BeforeBlockIndentations(
                    arg_3 + arg_0._continuation_string,
                    arg_3 + arg_0._continuation_string * 2,
                ),
            )
        if arg_1 == ":":
            # If the dict key was on the same line as the open brace, the new
            # correct indent should be relative to the key instead of the
            # current indent level
            arg_4 = arg_0._cont_stack[-1].valid_outdent_strings
            arg_5 = arg_0._cont_stack[-1].valid_continuation_strings.copy()
            arg_6 = list(arg_5.keys())
            arg_5[arg_6[0] + arg_0._continuation_string] = True
            # Note that the continuation of
            # d = {
            #       'a': 'b'
            #            'c'
            # }
            # is handled by the special-casing for hanging continued string indents.
            return _ContinuedIndent(
                HANGING_DICT_VALUE, arg_1, arg_2, arg_4, arg_5
            )
        return _ContinuedIndent(
            HANGING,
            arg_1,
            arg_2,
            _Indentations(arg_3, arg_3 + arg_0._continuation_string),
            _Indentations(arg_3 + arg_0._continuation_string),
        )


def Func(arg_0, arg_1, arg_2):
        """Extracts indentation information for a continued indent."""
        arg_3 = arg_0._tokens.line_indent(arg_2)
        arg_4 = arg_0._tokens.token_indent(arg_2)
        arg_5 = arg_0._tokens.token_indent(arg_2 + 1)
        if (
            arg_0._is_block_opener
            and arg_5 == arg_3 + arg_0._block_indent_string
        ):
            return _ContinuedIndent(
                CONTINUED_BLOCK,
                arg_1,
                arg_2,
                _Indentations(arg_4),
                _BeforeBlockIndentations(
                    arg_5, arg_5 + arg_0._continuation_string
                ),
            )
        return _ContinuedIndent(
            CONTINUED,
            arg_1,
            arg_2,
            _Indentations(arg_4, arg_5),
            _Indentations(arg_5),
        )


def Func(arg_0, arg_1, arg_2):
        """Pushes a new token for continued indentation on the stack.

        Tokens that can modify continued indentation offsets are:
          * opening brackets
          * 'lambda'
          * : inside dictionaries

        Func relies on the caller to filter out those
        interesting tokens.

        :param int token: The concrete token
        :param int position: The position of the token in the stream.
        """
        if _token_followed_by_eol(arg_0._tokens, arg_2):
            arg_0._cont_stack.append(arg_0._hanging_indent_after_bracket(arg_1, arg_2))
        else:
            arg_0._cont_stack.append(arg_0._continuation_inside_bracket(arg_1, arg_2))


def Func(arg_0, arg_1, arg_2, arg_3):
        """a new line has been encountered, process it if necessary"""
        if _last_token_on_line_is(arg_1, arg_2, ";"):
            arg_0.add_message("unnecessary-semicolon", arg_5=arg_1.start_line(arg_2))

        arg_4 = arg_1.start_line(arg_3)
        arg_5 = arg_1.line(arg_3)
        if arg_1.type(arg_3) not in _JUNK_TOKENS:
            arg_0._lines[arg_4] = arg_5.split("\n")[0]
        arg_0.check_lines(arg_5, arg_4)


def Func(arg_0, arg_1, arg_2):
        """Check that there are not unnecessary parens after a keyword.

        Parens are unnecessary if there is exactly one balanced outer pair on a
        line, and it is followed by a colon, and contains no commas (i.e. is not a
        tuple).

        Args:
        tokens: list of Tokens; the entire list of Tokens.
        start: int; the position of the keyword in the token list.
        """
        # If the next token is not a paren, we're fine.
        if arg_0._inside_brackets(":") and arg_1[arg_2][1] == "for":
            arg_0._pop_token()
        if arg_1[arg_2 + 1][1] != "(":
            return

        arg_3 = False
        arg_4 = 0
        arg_5 = str(arg_1[arg_2][1])
        arg_6 = arg_1[arg_2][2][0]

        for arg_7 in range(arg_2, len(arg_1) - 1):
            arg_8 = arg_1[arg_7]

            # If we hit a newline, then assume any parens were for continuation.
            if arg_8[0] == tokenize.NL:
                return

            if arg_8[1] == "(":
                arg_4 += 1
            elif arg_8[1] == ")":
                arg_4 -= 1
                if arg_4:
                    continue
                # ')' can't happen after if (foo), since it would be a syntax error.
                if arg_1[arg_7 + 1][1] in (":", ")", "]", "}", "in") or arg_1[arg_7 + 1][
                    0
                ] in (tokenize.NEWLINE, tokenize.ENDMARKER, tokenize.COMMENT):
                    # The empty tuple () is always accepted.
                    if arg_7 == arg_2 + 2:
                        return
                    if arg_5 == "not":
                        if not arg_3:
                            arg_0.add_message(
                                "superfluous-parens", line=arg_6, args=arg_5
                            )
                    elif arg_5 in ("return", "yield"):
                        arg_0.add_message(
                            "superfluous-parens", line=arg_6, args=arg_5
                        )
                    elif arg_5 not in arg_0._keywords_with_parens:
                        if not arg_3:
                            arg_0.add_message(
                                "superfluous-parens", line=arg_6, args=arg_5
                            )
                return
            elif arg_4 == 1:
                # This is a tuple, which is always acceptable.
                if arg_8[1] == ",":
                    return
                # 'and' and 'or' are the only boolean operators with lower precedence
                # than 'not', so parens are only required when they are found.
                if arg_8[1] in ("and", "or"):
                    arg_3 = True
                # A yield inside an expression must always be in parentheses,
                # quit early without error.
                elif arg_8[1] == "yield":
                    return
                # A generator expression always has a 'for' token in it, and
                # the 'for' token is only legal inside parens when it is in a
                # generator expression.  The parens are necessary here, so bail
                # without an error.
                elif arg_8[1] == "for":
                    return


def Func(arg_0, arg_1, arg_2):
        """Extended check of PEP-484 type hint presence"""
        if not arg_0._inside_brackets("("):
            return False
        # token_info
        # type string start end line
        #  0      1     2    3    4
        arg_3 = 0
        for arg_4 in arg_1[arg_2 - 1 :: -1]:
            if arg_4[1] == ":":
                return True
            if arg_4[1] == "(":
                return False
            if arg_4[1] == "]":
                arg_3 += 1
            elif arg_4[1] == "[":
                arg_3 -= 1
            elif arg_4[1] == ",":
                if not arg_3:
                    return False
            elif arg_4[1] in (".", "..."):
                continue
            elif arg_4[0] not in (tokenize.NAME, tokenize.STRING, tokenize.NL):
                return False
        return False


def Func(arg_0, arg_1):
        """check the node line number and check it if not yet done"""
        if not arg_1.is_statement:
            return
        if not arg_1.root().pure_python:
            return  # XXX block visit of child nodes
        arg_2 = arg_1.previous_sibling()
        if arg_2 is not None:
            arg_3 = arg_2.fromlineno
        else:
            # The line on which a finally: occurs in a try/finally
            # is not directly represented in the AST. We infer it
            # by taking the last line of the body and adding 1, which
            # should be the line of finally:
            if (
                isinstance(arg_1.parent, nodes.TryFinally)
                and arg_1 in arg_1.parent.finalbody
            ):
                arg_3 = arg_1.parent.body[0].tolineno + 1
            else:
                arg_3 = arg_1.parent.statement().fromlineno
        arg_4 = arg_1.fromlineno
        assert arg_4, arg_1
        if arg_3 == arg_4 and arg_0._visited_lines.get(arg_4) != 2:
            arg_0._check_multi_statement_line(arg_1, arg_4)
            return
        if arg_4 in arg_0._visited_lines:
            return
        try:
            arg_5 = arg_1.blockstart_tolineno
        except AttributeError:
            arg_5 = arg_1.tolineno
        assert arg_5, arg_1
        arg_6 = []
        for arg_4 in range(arg_4, arg_5 + 1):
            arg_0._visited_lines[arg_4] = 1
            try:
                arg_6.append(arg_0._lines[arg_4].rstrip())
            except KeyError:
                arg_6.append("")


def Func(arg_0, arg_1, arg_2):
        """Check for lines containing multiple statements."""
        # Do not warn about multiple nested context managers
        # in with statements.
        if isinstance(arg_1, nodes.With):
            return
        # For try... except... finally..., the two nodes
        # appear to be on the same line due to how the AST is built.
        if isinstance(arg_1, nodes.TryExcept) and isinstance(
            arg_1.parent, nodes.TryFinally
        ):
            return
        if (
            isinstance(arg_1.parent, nodes.If)
            and not arg_1.parent.orelse
            and arg_0.config.single_line_if_stmt
        ):
            return
        if (
            isinstance(arg_1.parent, nodes.ClassDef)
            and len(arg_1.parent.body) == 1
            and arg_0.config.single_line_class_stmt
        ):
            return
        arg_0.add_message("multiple-statements", arg_1=arg_1)
        arg_0._visited_lines[arg_2] = 2


def Func(arg_0, arg_1, arg_2):
        """check lines have less than a maximum number of characters
        """
        arg_3 = arg_0.config.max_line_length
        arg_4 = arg_0.config.ignore_long_lines

        def check_line(arg_5, arg_2):
            if not arg_5.endswith("\n"):
                arg_0.add_message("missing-final-newline", arg_5=arg_2)
            else:
                # exclude \f (formfeed) from the rstrip
                arg_6 = arg_5.rstrip("\t\n\r\v ")
                if not arg_6 and _EMPTY_LINE in arg_0.config.no_space_check:
                    # allow empty lines
                    pass
                elif arg_5[len(arg_6) :] not in ("\n", "\r\n"):
                    arg_0.add_message(
                        "trailing-whitespace", arg_5=arg_2, col_offset=len(arg_6)
                    )
                # Don't count excess whitespace in the line length.
                arg_5 = arg_6
            arg_7 = OPTION_RGX.search(arg_5)
            if arg_7 and "=" in arg_5:
                arg_8, arg_9, arg_10 = arg_7.group(1).partition("=")
                if arg_8.strip() == "disable":
                    if "line-too-long" in {
                        arg_11.strip() for arg_11 in arg_10.split(",")
                    }:
                        return None
                    arg_5 = arg_5.rsplit("#", 1)[0].rstrip()

            if len(arg_5) > arg_3 and not arg_4.search(arg_5):
                arg_0.add_message("line-too-long", arg_5=arg_2, args=(len(arg_5), arg_3))
            return arg_2 + 1

        arg_12 = {
            "\v",
            "\x0b",
            "\f",
            "\x0c",
            "\x1c",
            "\x1d",
            "\x1e",
            "\x85",
            "\u2028",
            "\u2029",
        }
        arg_13 = []
        for arg_5 in arg_1.splitlines(True):
            if arg_5[-1] in arg_12:
                arg_13.append(arg_5)
                continue

            if arg_13:
                arg_13.append(arg_5)
                arg_5 = "".join(arg_13)
                arg_13 = []

            arg_2 = check_line(arg_5, arg_2)
            if arg_2 is None:
                break

        if arg_13:
            check_line("".join(arg_13), arg_2)


def Func(arg_0, arg_1, arg_2, arg_3):
        """return the indent level of the string
        """
        arg_4 = arg_0.config.indent_string
        if arg_4 == "\\t":  # \t is not interpreted in the configuration file
            arg_4 = "\t"
        arg_5 = 0
        arg_6 = len(arg_4)
        while arg_1[:arg_6] == arg_4:
            arg_1 = arg_1[arg_6:]
            arg_5 += 1
        arg_7 = ""
        while arg_1 and arg_1[0] in " \t":
            if arg_1[0] != arg_4[0]:
                if arg_1[0] == "\t":
                    arg_8 = ("tab", "space")
                else:
                    arg_8 = ("space", "tab")
                arg_0.add_message("mixed-indentation", arg_8=arg_8, line=arg_3)
                return arg_5
            arg_7 += arg_1[0]
            arg_1 = arg_1[1:]
        if arg_5 != arg_2 or arg_7:
            arg_9 = "spaces"
            if arg_4[0] == "\t":
                arg_9 = "tabs"
            arg_0.add_message(
                "bad-indentation",
                line=arg_3,
                arg_8=(arg_5 * arg_6 + len(arg_7), arg_9, arg_2 * arg_6),
            )
        return None


def Func(arg_0):
    """Checks if an import node is in the context of a conditional.
    """
    arg_1 = arg_0.parent
    return isinstance(
        arg_1, (astroid.TryExcept, astroid.ExceptHandler, astroid.If, astroid.IfExp)
    )


def Func(arg_0, arg_1):
        """ Look for indexing exceptions. """
        try:
            for arg_2 in arg_1.value.infer():
                if not isinstance(arg_2, astroid.Instance):
                    continue
                if utils.inherit_from_std_ex(arg_2):
                    arg_0.add_message("indexing-exception", arg_1=arg_1)
        except astroid.InferenceError:
            return


def Func(arg_0, arg_1):
        """Visit an except handler block and check for exception unpacking."""

        def _is_used_in_except_block(arg_1):
            arg_2 = arg_1.scope()
            arg_3 = arg_1
            while (
                arg_3
                and arg_3 != arg_2
                and not isinstance(arg_3, astroid.ExceptHandler)
            ):
                arg_3 = arg_3.parent
            return isinstance(arg_3, astroid.ExceptHandler) and arg_3.type != arg_1

        if isinstance(arg_1.name, (astroid.Tuple, astroid.List)):
            arg_0.add_message("unpacking-in-except", arg_1=arg_1)
            return

        if not arg_1.name:
            return

        # Find any names
        arg_2 = arg_1.parent.scope()
        arg_4 = arg_2.nodes_of_class(astroid.Name, skip_klass=astroid.FunctionDef)
        arg_4 = list(arg_4)
        arg_5 = [
            scope_name
            for scope_name in arg_4
            if scope_name.name == arg_1.name.name
            and scope_name.lineno > arg_1.lineno
            and not _is_used_in_except_block(scope_name)
        ]
        arg_6 = {
            assign_name.lineno
            for assign_name in arg_2.nodes_of_class(
                astroid.AssignName, skip_klass=astroid.FunctionDef
            )
            if assign_name.name == arg_1.name.name
        }
        for arg_7 in arg_5:
            if any(
                arg_1.lineno < arg_8 < arg_7.lineno
                for arg_8 in arg_6
            ):
                continue
            arg_0.add_message("exception-escape", arg_1=arg_7)


def Func(arg_0, arg_1):
        """Visit a raise statement and check for raising
        strings or old-raise-syntax.
        """

        # Ignore empty raise.
        if arg_1.exc is None:
            return
        arg_2 = arg_1.exc
        if arg_0._check_raise_value(arg_1, arg_2):
            return
        try:
            arg_3 = next(astroid.unpack_infer(arg_2))
        except astroid.InferenceError:
            return
        arg_0._check_raise_value(arg_1, arg_3)


def Func():
    """search the pylint rc file and return its path if it find it, else None
    """
    # is there a pylint rc file in the current directory ?
    if os.path.exists("pylintrc"):
        return os.path.abspath("pylintrc")
    if os.path.exists(".pylintrc"):
        return os.path.abspath(".pylintrc")
    if os.path.isfile("__init__.py"):
        arg_0 = os.path.abspath(os.getcwd())
        while os.path.isfile(os.path.join(arg_0, "__init__.py")):
            arg_0 = os.path.abspath(os.path.join(arg_0, ".."))
            if os.path.isfile(os.path.join(arg_0, "pylintrc")):
                return os.path.join(arg_0, "pylintrc")
            if os.path.isfile(os.path.join(arg_0, ".pylintrc")):
                return os.path.join(arg_0, ".pylintrc")
    if "PYLINTRC" in os.environ and os.path.exists(os.environ["PYLINTRC"]):
        arg_1 = os.environ["PYLINTRC"]
    else:
        arg_2 = os.path.expanduser("~")
        if arg_2 in ("~", "/root"):
            arg_1 = ".pylintrc"
        else:
            arg_1 = os.path.join(arg_2, ".pylintrc")
            if not os.path.isfile(arg_1):
                arg_1 = os.path.join(arg_2, ".config", "pylintrc")
    if not os.path.isfile(arg_1):
        if os.path.isfile("/etc/pylintrc"):
            arg_1 = "/etc/pylintrc"
        else:
            arg_1 = None
    return arg_1


def Func(arg_0, arg_1, arg_2=""):
    """return a validated value for an option according to its type

    optional argument name is only used for error message formatting
    """
    try:
        arg_3 = arg_1["type"]
    except KeyError:
        # FIXME
        return arg_0
    return _call_validator(arg_3, arg_1, arg_2, arg_0)


def Func(arg_0, arg_1, arg_2, arg_3, arg_4):
        """optik callback for option setting"""
        if arg_2.startswith("--"):
            # remove -- on long option
            arg_2 = arg_2[2:]
        else:
            # short option, get its long equivalent
            arg_2 = arg_0._short_options[arg_2[1:]]
        # trick since we can't set action='store_true' on options
        if arg_3 is None:
            arg_3 = 1
        arg_0.global_set_option(arg_2, arg_3)


def Func(arg_0, arg_1=None, arg_2=(), arg_3=None):
        """write a configuration file according to the current configuration
        into the given stream or stdout
        """
        arg_4 = {}
        arg_5 = []
        for arg_6 in arg_0.options_providers:
            for arg_7, arg_8 in arg_6.options_by_section():
                if arg_7 is None:
                    arg_7 = arg_6.name
                if arg_7 in arg_2:
                    continue
                arg_8 = [
                    (n, d, v)
                    for (n, d, v) in arg_8
                    if d.get("type") is not None and not d.get("deprecated")
                ]
                if not arg_8:
                    continue
                if arg_7 not in arg_5:
                    arg_5.append(arg_7)
                arg_9 = arg_4.setdefault(arg_7, [])
                arg_9 += arg_8
        arg_1 = arg_1 or sys.stdout
        arg_10 = False
        for arg_7 in arg_5:
            if arg_10:
                print("\n", file=arg_1)
            utils.format_section(
                arg_1, arg_7.upper(), sorted(arg_4[arg_7])
            )
            arg_10 = True


def Func(arg_0, arg_1=0):
        """return the usage string for available options """
        arg_0.cmdline_parser.formatter.output_level = arg_1
        with _patch_optparse():
            return arg_0.cmdline_parser.format_Func()


def Func(arg_0):
        """initialize the provider using default values"""
        for arg_1, arg_2 in arg_0.options:
            arg_3 = arg_2.get("action")
            if arg_3 != "callback":
                # callback action have no default
                if arg_2 is None:
                    arg_2 = arg_0.get_option_def(arg_1)
                arg_4 = arg_2.get("default")
                arg_0.set_option(arg_1, arg_4, arg_3, arg_2)


def Func(arg_0, arg_1):
        """return the dictionary defining an option given its name"""
        assert arg_0.options
        for arg_2 in arg_0.options:
            if arg_2[0] == arg_1:
                return arg_2[1]
        raise optparse.OptionError(
            "no such option %s in section %r" % (arg_1, arg_0.name), arg_1
        )


def Func(arg_0):
        """return an iterator on options grouped by section

        (section, [list of (optname, optdict, optvalue)])
        """
        arg_1 = {}
        for arg_2, arg_3 in arg_0.options:
            arg_1.setdefault(arg_3.get("group"), []).append(
                (arg_2, arg_3, arg_0.option_value(arg_2))
            )
        if None in arg_1:
            yield None, arg_1.pop(None)
        for arg_4, arg_5 in sorted(arg_1.items()):
            yield arg_4.upper(), arg_5


def Func(arg_0, arg_1=(), arg_2=()):
    """Determines if a BoundMethod node represents a method call.

    Args:
      func (astroid.BoundMethod): The BoundMethod AST node to check.
      types (Optional[String]): Optional sequence of caller type names to restrict check.
      methods (Optional[String]): Optional sequence of method names to restrict check.

    Returns:
      bool: true if the node represents a method call for the given type and
      method names, False otherwise.
    """
    return (
        isinstance(arg_0, astroid.BoundMethod)
        and isinstance(arg_0.bound, astroid.Instance)
        and (arg_0.bound.name in arg_1 if arg_1 else True)
        and (arg_0.name in arg_2 if arg_2 else True)
    )


def Func(arg_0):
    """Checks if node represents a string with complex formatting specs.

    Args:
        node (astroid.node_classes.NodeNG): AST node to check
    Returns:
        bool: True if inferred string uses complex formatting, False otherwise
    """
    arg_1 = utils.safe_infer(arg_0)
    if arg_1 is None or not isinstance(arg_1.value, str):
        return True
    try:
        arg_2 = list(string.Formatter().parse(arg_1.value))
    except ValueError:
        # This format string is invalid
        return False
    for arg_3, arg_3, arg_4, arg_3 in arg_2:
        if arg_4:
            return True
    return False


def Func(arg_0, arg_1):
        """Checks to see if a module uses a non-Python logging module."""
        try:
            arg_2 = arg_0._from_imports[arg_1.modname]
            for arg_3, arg_4 in arg_1.names:
                if arg_3 == arg_2:
                    arg_0._logging_names.add(arg_4 or arg_3)
        except KeyError:
            pass


def Func(arg_0, arg_1):
        """Checks calls to logging methods."""

        def is_logging_name():
            return (
                isinstance(arg_1.func, astroid.Attribute)
                and isinstance(arg_1.func.expr, astroid.Name)
                and arg_1.func.expr.name in arg_0._logging_names
            )

        def is_logger_class():
            try:
                for arg_2 in arg_1.func.infer():
                    if isinstance(arg_2, astroid.BoundMethod):
                        arg_3 = arg_2._proxied.parent
                        if isinstance(arg_3, astroid.ClassDef) and (
                            arg_3.qname() == "logging.Logger"
                            or any(
                                arg_4.qname() == "logging.Logger"
                                for arg_4 in arg_3.ancestors()
                            )
                        ):
                            return True, arg_2._proxied.name
            except astroid.exceptions.InferenceError:
                pass
            return False, None

        if is_logging_name():
            arg_5 = arg_1.func.attrname
        else:
            arg_6, arg_5 = is_logger_class()
            if not arg_6:
                return
        arg_0._check_log_method(arg_1, arg_5)


def Func(arg_0):
    """return True if the node is inside a kind of for loop"""
    arg_1 = arg_0.parent
    while arg_1 is not None:
        if isinstance(
            arg_1,
            (
                astroid.For,
                astroid.ListComp,
                astroid.SetComp,
                astroid.DictComp,
                astroid.GeneratorExp,
            ),
        ):
            return True
        arg_1 = arg_1.parent
    return False


def Func(arg_0):
    """
    Returns the loop node that holds the break node in arguments.

    Args:
        break_node (astroid.Break): the break node of interest.

    Returns:
        astroid.For or astroid.While: the loop node holding the break node.
    """
    arg_1 = (astroid.For, astroid.While)
    arg_2 = arg_0.parent
    while not isinstance(arg_2, arg_1) or arg_0 in getattr(
        arg_2, "orelse", []
    ):
        arg_0 = arg_2
        arg_2 = arg_2.parent
        if arg_2 is None:
            break
    return arg_2


def Func(arg_0):
    """
    Returns true if a loop may ends up in a break statement.

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

    Returns:
        bool: True if the loop may ends up in a break statement, False otherwise.
    """
    arg_1 = (astroid.For, astroid.While)
    arg_2 = (astroid.FunctionDef, astroid.ClassDef)
    arg_3 = [
        arg_4
        for arg_4 in arg_0.nodes_of_class(arg_1, skip_klass=arg_2)
        if arg_4 != arg_0
    ]
    return any(
        arg_4
        for arg_4 in arg_0.nodes_of_class(astroid.Break, skip_klass=arg_2)
        if _get_break_loop_node(arg_4) not in arg_3
    )


def Func(arg_0):
    """Returns a tuple of property classes and names.

    Property classes are fully qualified, such as 'abc.abstractproperty' and
    property names are the actual names, such as 'abstract_property'.
    """
    arg_1 = {BUILTIN_PROPERTY}
    arg_2 = set()  # Not returning 'property', it has its own check.
    if arg_0 is not None:
        arg_1.update(arg_0.property_classes)
        arg_2.update(
            (arg_3.rsplit(".", 1)[-1] for arg_3 in arg_0.property_classes)
        )
    return arg_1, arg_2


def Func(arg_0):
    """return True if the object is a method redefined via decorator.

    For example:
        @property
        def x(self): return self._x
        @x.setter
        def x(self, value): self._x = value
    """
    if arg_0.decorators:
        for arg_1 in arg_0.decorators.nodes:
            if (
                isinstance(arg_1, astroid.Attribute)
                and getattr(arg_1.expr, "name", None) == arg_0.name
            ):
                return True
    return False


def Func(arg_0):
    """Is this a call with exactly 1 argument,
    where that argument is positional?
    """
    return isinstance(arg_0, astroid.Call) and len(arg_0.args) == 1 and not arg_0.keywords


def Func(arg_0, arg_1):
        """ Check instantiating abstract class with
        abc.ABCMeta as metaclass.
        """
        try:
            for arg_2 in arg_1.func.infer():
                arg_0._check_inferred_class_is_abstract(arg_2, arg_1)
        except astroid.InferenceError:
            return


def Func(arg_0, arg_1):
        """Check that any loop with an else clause has a break statement."""
        if arg_1.orelse and not _loop_exits_early(arg_1):
            arg_0.add_message(
                "useless-else-on-loop",
                arg_1=arg_1,
                # This is not optimal, but the line previous
                # to the first statement in the else clause
                # will usually be the one that contains the else:.
                line=arg_1.orelse[0].lineno - 1,
            )


def Func(arg_0):
        """initialize visit variables and statistics
        """
        arg_0._tryfinallys = []
        arg_0.stats = arg_0.linter.add_stats(module=0, function=0, method=0, class_=0)


def Func(arg_0, arg_1):
        """check for various kind of statements without effect"""
        arg_2 = arg_1.value
        if isinstance(arg_2, astroid.Const) and isinstance(arg_2.value, str):
            # treat string statement in a separated message
            # Handle PEP-257 attribute docstrings.
            # An attribute docstring is defined as being a string right after
            # an assignment at the module level, class level or __init__ level.
            arg_3 = arg_2.scope()
            if isinstance(
                arg_3, (astroid.ClassDef, astroid.Module, astroid.FunctionDef)
            ):
                if isinstance(arg_3, astroid.FunctionDef) and arg_3.name != "__init__":
                    pass
                else:
                    arg_4 = arg_2.previous_sibling()
                    if (
                        arg_4 is not None
                        and arg_4.scope() is arg_3
                        and isinstance(arg_4, (astroid.Assign, astroid.AnnAssign))
                    ):
                        return
            arg_0.add_message("pointless-string-statement", arg_1=arg_1)
            return

        # Ignore if this is :
        # * a direct function call
        # * the unique child of a try/except body
        # * a yieldd statement
        # * an ellipsis (which can be used on Python 3 instead of pass)
        # warn W0106 if we have any underlying function call (we can't predict
        # side effects), else pointless-statement
        if isinstance(
            arg_2, (astroid.Yield, astroid.Await, astroid.Ellipsis, astroid.Call)
        ) or (
            isinstance(arg_1.parent, astroid.TryExcept) and arg_1.parent.body == [arg_1]
        ):
            return
        if any(arg_2.nodes_of_class(astroid.Call)):
            arg_0.add_message(
                "expression-not-assigned", arg_1=arg_1, args=arg_2.as_string()
            )
        else:
            arg_0.add_message("pointless-statement", arg_1=arg_1)


def Func(arg_0, arg_1):
        """check whether or not the lambda is suspicious
        """
        # if the body of the lambda is a call expression with the same
        # argument list as the lambda itself, then the lambda is
        # possibly unnecessary and at least suspicious.
        if arg_1.args.defaults:
            # If the arguments of the lambda include defaults, then a
            # judgment cannot be made because there is no way to check
            # that the defaults defined by the lambda are the same as
            # the defaults defined by the function called in the body
            # of the lambda.
            return
        arg_2 = arg_1.body
        if not isinstance(arg_2, astroid.Call):
            # The body of the lambda must be a function call expression
            # for the lambda to be unnecessary.
            return
        if isinstance(arg_1.body.func, astroid.Attribute) and isinstance(
            arg_1.body.func.expr, astroid.Call
        ):
            # Chained call, the intermediate call might
            # return something else (but we don't check that, yet).
            return

        arg_3 = CallSite.from_call(arg_2)
        arg_4 = list(arg_1.args.args)
        arg_5 = list(arg_0._filter_vararg(arg_1, arg_2.args))
        if arg_1.args.kwarg:
            if arg_0._has_variadic_argument(arg_2.kwargs, arg_1.args.kwarg):
                return

        if arg_1.args.vararg:
            if arg_0._has_variadic_argument(arg_2.starargs, arg_1.args.vararg):
                return
        elif arg_2.starargs:
            return

        if arg_2.keywords:
            # Look for additional keyword arguments that are not part
            # of the lambda's signature
            arg_6 = {keyword.name for keyword in arg_1.args.defaults}
            if len(arg_6) != len(arg_3.keyword_arguments):
                # Different lengths, so probably not identical
                return
            if set(arg_3.keyword_arguments).difference(arg_6):
                return

        # The "ordinary" arguments must be in a correspondence such that:
        # ordinary_args[i].name == call.args[i].name.
        if len(arg_4) != len(arg_5):
            return
        for arg_7, arg_8 in zip(arg_4, arg_5):
            if not isinstance(arg_8, astroid.Name):
                return
            if arg_7.name != arg_8.name:
                return

        arg_0.add_message("unnecessary-lambda", line=arg_1.fromlineno, arg_1=arg_1)


def Func(arg_0, arg_1):
        """check the use of an assert statement on a tuple."""
        if (
            arg_1.fail is None
            and isinstance(arg_1.test, astroid.Tuple)
            and len(arg_1.test.elts) == 2
        ):
            arg_0.add_message("assert-on-tuple", arg_1=arg_1)


def Func(arg_0, arg_1):
        """check duplicate key in dictionary"""
        arg_2 = set()
        for arg_3, arg_4 in arg_1.items:
            if isinstance(arg_3, astroid.Const):
                arg_5 = arg_3.value
                if arg_5 in arg_2:
                    arg_0.add_message("duplicate-key", arg_1=arg_1, args=arg_5)
                arg_2.add(arg_5)


def Func(arg_0, arg_1, arg_2, arg_3=()):
        """check that a node is not inside a finally clause of a
        try...finally statement.
        If we found before a try...finally bloc a parent which its type is
        in breaker_classes, we skip the whole check."""
        # if self._tryfinallys is empty, we're not an in try...finally block
        if not arg_0._tryfinallys:
            return
        # the node could be a grand-grand...-children of the try...finally
        arg_4 = arg_1.parent
        arg_5 = arg_1
        while arg_4 and not isinstance(arg_4, arg_3):
            if hasattr(arg_4, "finalbody") and arg_5 in arg_4.finalbody:
                arg_0.add_message("lost-exception", arg_1=arg_1, args=arg_2)
                return
            arg_5 = arg_4
            arg_4 = arg_5.parent


def Func(arg_0, arg_1):
        """check module level assigned names"""
        arg_0._check_assign_to_new_keyword_violation(arg_1.name, arg_1)
        arg_2 = arg_1.frame()
        arg_3 = arg_1.assign_type()
        if isinstance(arg_3, astroid.Comprehension):
            arg_0._check_name("inlinevar", arg_1.name, arg_1)
        elif isinstance(arg_2, astroid.Module):
            if isinstance(arg_3, astroid.Assign) and not in_loop(arg_3):
                if isinstance(utils.safe_infer(arg_3.value), astroid.ClassDef):
                    arg_0._check_name("class", arg_1.name, arg_1)
                else:
                    if not _redefines_import(arg_1):
                        # Don't emit if the name redefines an import
                        # in an ImportError except handler.
                        arg_0._check_name("const", arg_1.name, arg_1)
            elif isinstance(arg_3, astroid.ExceptHandler):
                arg_0._check_name("variable", arg_1.name, arg_1)
        elif isinstance(arg_2, astroid.FunctionDef):
            # global introduced variable aren't in the function locals
            if arg_1.name in arg_2 and arg_1.name not in arg_2.argnames():
                if not _redefines_import(arg_1):
                    arg_0._check_name("variable", arg_1.name, arg_1)
        elif isinstance(arg_2, astroid.ClassDef):
            if not list(arg_2.local_attr_ancestors(arg_1.name)):
                arg_0._check_name("class_attribute", arg_1.name, arg_1)


def Func(arg_0, arg_1, arg_2):
        """Check if we compare to a literal, which is usually what we do not want to do."""
        arg_3 = (astroid.List, astroid.Tuple, astroid.Dict, astroid.Set)
        arg_4 = isinstance(arg_1, arg_3)
        arg_5 = False
        if isinstance(arg_1, astroid.Const):
            if isinstance(arg_1.value, bool) or arg_1.value is None:
                # Not interested in this values.
                return
            arg_5 = isinstance(arg_1.value, (bytes, str, int, float))

        if arg_5 or arg_4:
            arg_0.add_message("literal-comparison", arg_2=arg_2)


def Func(arg_0, arg_1, arg_2, arg_3=()):
        """create the subgraphs representing any `if` and `for` statements"""
        if arg_0.graph is None:
            # global loop
            arg_0.graph = PathGraph(arg_1)
            arg_0.Func_parse(arg_1, arg_1, arg_3)
            arg_0.graphs["%s%s" % (arg_0.classname, arg_2)] = arg_0.graph
            arg_0.reset()
        else:
            arg_0._append_node(arg_1)
            arg_0.Func_parse(arg_1, arg_1, arg_3)


def Func(
        arg_0, arg_1, arg_2, arg_3
    ):  # pylint: disable=unused-argument
        """parse the body and any `else` block of `if` and `for` statements"""
        arg_4 = []
        arg_0.tail = arg_1
        arg_0.dispatch_list(arg_1.body)
        arg_4.append(arg_0.tail)
        for arg_6 in arg_3:
            arg_0.tail = arg_1
            arg_0.dispatch_list(arg_6.body)
            arg_4.append(arg_0.tail)
        if arg_1.orelse:
            arg_0.tail = arg_1
            arg_0.dispatch_list(arg_1.orelse)
            arg_4.append(arg_0.tail)
        else:
            arg_4.append(arg_1)
        if arg_1:
            arg_7 = "%s" % arg_0._bottom_counter
            arg_0._bottom_counter += 1
            for arg_8 in arg_4:
                arg_0.graph.connect(arg_8, arg_7)
            arg_0.tail = arg_7


def Func(arg_0, arg_1):
        """visit an astroid.Module node to check too complex rating and
        add message if is greather than max_complexity stored from options"""
        arg_2 = PathGraphingAstVisitor()
        for arg_3 in arg_1.body:
            arg_2.preorder(arg_3, arg_2)
        for arg_4 in arg_2.graphs.values():
            arg_5 = arg_4.complexity()
            arg_1 = arg_4.root
            if hasattr(arg_1, "name"):
                arg_6 = "'%s'" % arg_1.name
            else:
                arg_6 = "This '%s'" % arg_1.__class__.__name__.lower()
            if arg_5 <= arg_0.config.max_complexity:
                continue
            arg_0.add_message(
                "too-complex", arg_1=arg_1, confidence=HIGH, args=(arg_6, arg_5)
            )


def Func(arg_0, arg_1):
        """walk to the checker's dir and collect visit and leave methods"""
        # XXX : should be possible to merge needed_checkers and Func
        arg_2 = set()
        arg_3 = set()
        arg_4 = arg_0.visit_events
        arg_5 = arg_0.leave_events
        for arg_6 in dir(arg_1):
            arg_7 = arg_6[6:]
            if arg_7 == "default":
                continue
            if arg_6.startswith("visit_"):
                arg_8 = getattr(arg_1, arg_6)
                # don't use visit_methods with no activated message:
                if arg_0._is_method_enabled(arg_8):
                    arg_4[arg_7].append(arg_8)
                    arg_2.add(arg_7)
            elif arg_6.startswith("leave_"):
                arg_9 = getattr(arg_1, arg_6)
                # don't use leave_methods with no activated message:
                if arg_0._is_method_enabled(arg_9):
                    arg_5[arg_7].append(arg_9)
                    arg_3.add(arg_7)
        arg_10 = getattr(arg_1, "visit_default", None)
        if arg_10:
            for arg_11 in nodes.ALL_NODE_CLASSES:
                arg_7 = arg_11.__name__.lower()
                if arg_7 not in arg_2:
                    arg_4[arg_7].append(arg_10)


def Func(arg_0, arg_1):
        """call visit events of astroid checkers for the given node, recurse on
        its children, then leave events.
        """
        arg_2 = arg_1.__class__.__name__.lower()

        # Detect if the node is a new name for a deprecated alias.
        # In this case, favour the methods for the deprecated
        # alias if any,  in order to maintain backwards
        # compatibility.
        arg_3 = arg_0.visit_events.get(arg_2, ())
        arg_4 = arg_0.leave_events.get(arg_2, ())

        if arg_1.is_statement:
            arg_0.nbstatements += 1
        # generate events for this node on each checker
        for arg_5 in arg_3 or ():
            arg_5(arg_1)
        # recurse on children
        for arg_6 in arg_1.get_children():
            arg_0.Func(arg_6)
        for arg_5 in arg_4 or ():
            arg_5(arg_1)


def Func(arg_0, arg_1, arg_2, arg_3, arg_4=None):
        """create a relation ship
        """
        arg_5 = Relationship(arg_1, arg_2, arg_3, arg_4)
        arg_0.relationships.setdefault(arg_3, []).append(arg_5)


def Func(arg_0, arg_1, arg_2):
        """return a relation ship or None
        """
        for arg_3 in arg_0.relationships.get(arg_2, ()):
            if arg_3.from_object is arg_1:
                return arg_3
        raise KeyError(arg_2)


def Func(arg_0, arg_1):
        """return visible attributes, possibly with class name"""
        arg_2 = []
        arg_3 = [
            (n, m)
            for n, m in arg_1.items()
            if isinstance(m, astroid.FunctionDef) and decorated_with_property(m)
        ]
        for arg_4, arg_5 in (
            list(arg_1.instance_attrs_type.items())
            + list(arg_1.locals_type.items())
            + arg_3
        ):
            if not arg_0.show_attr(arg_4):
                continue
            arg_6 = arg_0.class_names(arg_5)
            if arg_6:
                arg_4 = "%s : %s" % (arg_4, ", ".join(arg_6))
            arg_2.append(arg_4)
        return sorted(arg_2)


def Func(arg_0, arg_1):
        """return visible methods"""
        arg_2 = [
            m
            for m in arg_1.values()
            if isinstance(m, astroid.FunctionDef)
            and not decorated_with_property(m)
            and arg_0.show_attr(m.name)
        ]
        return sorted(arg_2, key=lambda n: n.name)


def Func(arg_0, arg_1, arg_2):
        """create a diagram object
        """
        assert arg_2 not in arg_0._nodes
        arg_3 = DiagramEntity(arg_1, arg_2)
        arg_0._nodes[arg_2] = arg_3
        arg_0.objects.append(arg_3)


def Func(arg_0, arg_1):
        """return class names if needed in diagram"""
        arg_2 = []
        for arg_3 in arg_1:
            if isinstance(arg_3, astroid.Instance):
                arg_3 = arg_3._proxied
            if (
                isinstance(arg_3, astroid.ClassDef)
                and hasattr(arg_3, "name")
                and not arg_0.has_node(arg_3)
            ):
                if arg_3.name not in arg_2:
                    arg_4 = arg_3.name
                    arg_2.append(arg_4)
        return arg_2


def Func(arg_0):
        """return all class nodes in the diagram"""
        return [arg_1 for arg_1 in arg_0.objects if isinstance(arg_1.node, astroid.ClassDef)]


def Func(arg_0, arg_1, arg_2):
        """return a module by its name, looking also for relative imports;
        raise KeyError if not found
        """
        for arg_3 in arg_0.modules():
            arg_4 = arg_3.node.name
            if arg_4 == arg_1:
                return arg_3
            # search for fullname of relative import modules
            arg_5 = arg_2.root().name
            if arg_4 == "%s.%s" % (arg_5, arg_1):
                return arg_3
            if arg_4 == "%s.%s" % (arg_5.rsplit(".", 1)[0], arg_1):
                return arg_3
        raise KeyError(arg_1)


def Func(arg_0, arg_1, arg_2):
        """add dependencies created by from-imports
        """
        arg_3 = arg_1.root().name
        arg_4 = arg_0.module(arg_3)
        if arg_2 not in arg_4.node.depends:
            arg_4.node.depends.append(arg_2)


def Func(
    arg_0, arg_1,
    arg_2='config.yaml', arg_3=None,
):
    """Deletes old deployed versions of the function in AWS Lambda.

    Won't delete $Latest and any aliased version

    :param str src:
        The path to your Lambda ready project (folder must contain a valid
        config.yaml and handler module (e.g.: service.py).
    :param int keep_last_versions:
        The number of recent versions to keep and not delete
    """
    if arg_1 <= 0:
        print("Won't delete all versions. Please do this manually")
    else:
        arg_4 = os.path.join(arg_0, arg_2)
        arg_5 = read_cfg(arg_4, arg_3)

        arg_3 = arg_5.get('profile')
        arg_6 = arg_5.get('aws_access_key_id')
        arg_7 = arg_5.get('aws_secret_access_key')

        arg_8 = get_client(
            'lambda', arg_3, arg_6, arg_7,
            arg_5.get('region'),
        )

        arg_9 = arg_8.list_versions_by_function(
            FunctionName=arg_5.get('function_name'),
        )
        arg_10 = arg_9.get('Versions')
        if len(arg_9.get('Versions')) < arg_1:
            print('Nothing to delete. (Too few versions published)')
        else:
            arg_11 = [elem.get('Version') for elem in
                               arg_10[1:-arg_1]]
            for arg_12 in arg_11:
                try:
                    arg_8.delete_function(
                        FunctionName=arg_5.get('function_name'),
                        Qualifier=arg_12,
                    )
                except botocore.exceptions.ClientError as e:
                    print('Skipping Version {}: {}'
                          .format(arg_12, e.message))


def Func(
        arg_0, arg_1=None, arg_2=None,
        arg_3='config.yaml', arg_4=None,
        arg_5=False
):
    """Deploys a new function to AWS Lambda.

    :param str src:
        The path to your Lambda ready project (folder must contain a valid
        config.yaml and handler module (e.g.: service.py).
    :param str local_package:
        The path to a local package with should be included in the Func as
        well (and/or is not available on PyPi)
    """
    # Load and parse the config file.
    arg_6 = os.path.join(arg_0, arg_3)
    arg_7 = read_cfg(arg_6, arg_4)

    # Copy all the pip dependencies required to run your code into a temporary
    # folder then add the handler file in the root of this directory.
    # Zip the contents of this folder into a single file and output to the dist
    # directory.
    arg_8 = build(
        arg_0, arg_3=arg_3,
        arg_1=arg_1,
        arg_2=arg_2,
    )

    arg_9 = get_function_config(arg_7)
    if arg_9:
        update_function(arg_7, arg_8, arg_9, arg_5=arg_5)
    else:
        create_function(arg_7, arg_8)