code: def apply_aliases(string: str, aliases: dict):
      for dotted_path, alias in aliases.items():
          string = string.replace(dotted_path, alias)
      return string
  
file_path: autokeras/docs/keras_autodoc/docstring.py
imports: import itertools
  import re
  from sphinx.util.typing import stringify
  from .None import utils
label_desc: Use image node_id 7 for calling a global function with example usage: apply_aliases(string, aliases) and returns: string