code: def rename_var(
      block: paddle.device.framework.Block, old_name: str, new_name: str
  ):
      """ """
      for op in block.ops:
          for input_name in op.input_arg_names:
              if input_name == old_name:
                  op._rename_input(old_name, new_name)
  
          for output_name in op.output_arg_names:
              if output_name == old_name:
                  op._rename_output(old_name, new_name)
  
      block._rename_var(old_name, new_name)
  
file_path: PaddleHub/paddlehub/compat/paddle_utils.py
imports: import contextlib
  import copy
  from typing import Callable
  from typing import List
  import paddle
  from paddle.framework import core
  from paddlehub.utils.utils import Version
label_desc: Use image node_id 4 for calling a global function with example usage: rename_var(block, old_name, new_name) without return types