code: def _get_all_module_element(module, exclude, return_strings, class_):
      if isinstance(module, str):
          module = import_object(module)
      exclude = exclude or []
      module_data = []
      for name in dir(module):
          module_member = getattr(module, name)
          if not (isfunction(module_member) or isclass(module_member)):
              continue
          if name[0] == "_" or name in exclude:
              continue
          if module.__name__ not in module_member.__module__:
              continue
          if module_member in module_data:
              continue
          if class_ and not isclass(module_member):
              continue
          if not class_ and not isfunction(module_member):
              continue
          if return_strings:
              module_data.append(f"{module.__name__}.{name}")
          else:
              module_data.append(module_member)
      module_data.sort(key=id)
      return module_data
  
file_path: autokeras/docs/keras_autodoc/gathering_members.py
imports: import inspect
  from inspect import isclass
  from inspect import isfunction
  from inspect import isroutine
  from typing import List
  from .utils import import_object
label_desc: Use image node_id 4 for calling a global function with example usage: _get_all_module_element(module, exclude, return_strings, class_) and returns: module_data