code: def _replace_name(context: str, name_from: str, name_to: str) -> str:
      """
      replace node name
      """
      patterns = [
          (" ", " "),
          (" ", "."),
          (" ", ","),
          ("(", ")"),
          ("(", ","),
          (" ", ")"),
          (" ", ""),
          ("", " "),
      ]
      for p in patterns:
          source = p[0] + name_from + p[1]
          target = p[0] + name_to + p[1]
          if source in context:
              context = context.replace(source, target)
              break
      return context
  
file_path: colossalai/colossalai/autochunk/autochunk_codegen.py
imports: from typing import Any, Callable, Dict, Iterable, List, Tuple
  import torch
  import colossalai
  from colossalai.fx._compatibility import is_compatible_with_meta
  from colossalai.fx.codegen.activation_checkpoint_codegen import CODEGEN_AVAILABLE
  from torch.fx.node import Argument, Node, _get_qualified_name, _type_repr, map_arg
  from .search_chunk import SearchChunk
  from .utils import delete_free_var_from_last_use, get_logger, get_node_name, get_node_shape
label_desc: Use image node_id 4 for calling a global function with example usage: _replace_name(context, name_from, name_to) and returns: context