def METHOD_NAME(
    children: List[Node], renames: Dict[str, str]
) -> None:
    """
    Renames the arguments in the children list of a node by searching for the
    argument list or trailing list and renaming all keys in `renames` dict to
    corresponding value.
    """
    for child in children:
        if not isinstance(child, Node):
            continue
        if (
            child.type == python_symbols.arglist
            or child.type == python_symbols.trailer
        ):
            if not child.children:
                continue
            for _, child in enumerate(child.children):
                if not isinstance(child, Node):
                    continue
                else:
                    if child.type == python_symbols.argument:
                        if child.children[0].value in renames:
                            child.children[0].value = renames[
                                child.children[0].value
                            ]