code: def list_namespace(
      namespace, type_pattern, filter, ignore_case=False, show_all=False
  ):
      """Return dictionary of all objects in a namespace dictionary that match
      type_pattern and filter."""
      pattern_list = filter.split(".")
      if len(pattern_list) == 1:
          return filter_ns(
              namespace,
              name_pattern=pattern_list[0],
              type_pattern=type_pattern,
              ignore_case=ignore_case,
              show_all=show_all,
          )
      else:
          # This is where we can change if all objects should be searched or
          # only modules. Just change the type_pattern to module to search only
          # modules
          filtered = filter_ns(
              namespace,
              name_pattern=pattern_list[0],
              type_pattern="all",
              ignore_case=ignore_case,
              show_all=show_all,
          )
          results = {}
          for name, obj in iteritems(filtered):
              ns = list_namespace(
                  dict_dir(obj),
                  type_pattern,
                  ".".join(pattern_list[1:]),
                  ignore_case=ignore_case,
                  show_all=show_all,
              )
              for inner_name, inner_obj in iteritems(ns):
                  results["%s.%s" % (name, inner_name)] = inner_obj
          return results
  
file_path: catboost/contrib/python/ipython/py2/IPython/utils/wildcard.py
imports: import re
  import types
  from IPython.utils.dir2 import dir2
  from .py3compat import iteritems
label_desc: Use image node_id 6 for calling a global function with example usage: list_namespace(namespace, type_pattern, filter, ignore_case, show_all) and returns: filter_ns, results