code: def rename_kwargs(func_name: str, kwargs: Dict, aliases: Dict):
      """Used to update deprecated argument names with new names.
  
      Throws a
      `TypeError` if both arguments are provided, and warns if old alias
      is used. Nothing is returned as the passed `kwargs` are modified
      directly. Implementation is inspired from [`StackOverflow`][stack_link].
  
      [stack_link]: https://stackoverflow.com/questions/49802412/how-to-implement-deprecation-in-python-with-argument-alias
  
  
      Args:
          func_name: name of decorated function.
          kwargs: Arguments supplied to the method.
          aliases: Dictionary of aliases for a function's arguments.
  
      Raises:
          TypeError: If both arguments are provided.
      """  # noqa: E501
      for old_alias, new_alias in aliases.items():
          if old_alias in kwargs:
              if new_alias in kwargs:
                  raise TypeError(
                      f"{func_name} received both {old_alias} and {new_alias}"
                  )
              warn(
                  f"{old_alias} is deprecated; use {new_alias}",
                  DeprecationWarning,
              )
              kwargs[new_alias] = kwargs.pop(old_alias)
  
imports: from __future__ import annotations
  import importlib
  import os
  import socket
  import sys
  from functools import singledispatch, wraps
  from pathlib import Path
  from typing import Any, Callable, Dict, Iterable, List, Union
  from warnings import warn
  import numpy
  import pandas
label_desc: Use image node_id 13 for calling a global function with example usage: rename_kwargs(func_name, kwargs, aliases) without return types