code: def test_no_mutable_default_args(self):
      type_blacklist = (list, dict)
      badlist = []
      # Collect mutable default arguments
      for mod in walk_modules():
          for func in get_functions(mod):
              for arg_name, value in get_default_arguments(func):
                  if isinstance(value, type_blacklist):
                      badlist.append((func, arg_name, type(value)))
  
      if len(badlist) > 0:
          # Report the error
          s = six.StringIO()
          s.write(
              "Some functions have mutable values as default arguments:\n\n"
          )
          for func, arg_name, value_type in badlist:
              s.write(
                  "{}.{}: arg='{}' type={}\n".format(
                      func.__module__,
                      func.__name__,
                      arg_name,
                      value_type,
                  )
              )
          assert False, s.getvalue()
  
file_path: chainer/tests/chainer_tests/test_chainer_objects.py
imports: import importlib
  import inspect
  import pkgutil
  import types
  import unittest
  import six
  import chainer
  from chainer import testing
label_desc: Use image node_id 1 for calling the TestFunctions obj's underlying member method code with example usage: obj.test_no_mutable_default_args() without return types