def _check_dangerous_default(self, node):
    'Check for dangerous default values as arguments.'

    def is_iterable(internal_node):
        return isinstance(internal_node, (astroid.List, astroid.Set, astroid.Dict))
    defaults = (node.args.defaults or ([] + node.args.kw_defaults) or [])
    for default in defaults:
        if (not default):
            continue
        try:
            value = next(default.infer())
        except astroid.InferenceError:
            continue
        if (isinstance(value, astroid.Instance) and (value.qname() in DEFAULT_ARGUMENT_SYMBOLS)):
            if (value is default):
                msg = DEFAULT_ARGUMENT_SYMBOLS[value.qname()]
            elif (isinstance(value, astroid.Instance) or is_iterable(value)):
                if is_iterable(default):
                    msg = value.pytype()
                elif isinstance(default, astroid.Call):
                    msg = f'{value.name}() ({value.qname()})'
                else:
                    msg = f'{default.as_string()} ({value.qname()})'
            else:
                msg = f'{default.as_string()} ({DEFAULT_ARGUMENT_SYMBOLS[value.qname()]})'
            self.add_message('dangerous-default-value', node=node, args=(msg,))
Check for dangerous default values as arguments.
def _check_dangerous_default(self, node):
    

    def is_iterable(internal_node):
        return isinstance(internal_node, (astroid.List, astroid.Set, astroid.Dict))
    defaults = (node.args.defaults or ([] + node.args.kw_defaults) or [])
    for default in defaults:
        if (not default):
            continue
        try:
            value = next(default.infer())
        except astroid.InferenceError:
            continue
        if (isinstance(value, astroid.Instance) and (value.qname() in DEFAULT_ARGUMENT_SYMBOLS)):
            if (value is default):
                msg = DEFAULT_ARGUMENT_SYMBOLS[value.qname()]
            elif (isinstance(value, astroid.Instance) or is_iterable(value)):
                if is_iterable(default):
                    msg = value.pytype()
                elif isinstance(default, astroid.Call):
                    msg = f'{value.name}() ({value.qname()})'
                else:
                    msg = f'{default.as_string()} ({value.qname()})'
            else:
                msg = f'{default.as_string()} ({DEFAULT_ARGUMENT_SYMBOLS[value.qname()]})'
            self.add_message('dangerous-default-value', node=node, args=(msg,))