def METHOD_NAME(node: Any,
                            repl: Dict[str, str],
                            symrepl: Dict[symbolic.SymbolicType, symbolic.SymbolicType] = None):
    symrepl = symrepl or {
        symbolic.pystr_to_symbolic(symname):
        symbolic.pystr_to_symbolic(new_name) if isinstance(new_name, str) else new_name
        for symname, new_name in repl.items()
    }
    for propclass, propval in node.properties():
        if propval is None:
            continue
        pname = propclass.attr_name
        if isinstance(propclass, properties.SymbolicProperty):
            # NOTE: `propval` can be a numeric constant instead of a symbolic expression.
            if not symbolic.issymbolic(propval):
                setattr(node, pname, symbolic.pystr_to_symbolic(str(propval)).subs(symrepl))
            else:
                setattr(node, pname, propval.subs(symrepl))
        elif isinstance(propclass, properties.DataProperty):
            if propval in repl:
                setattr(node, pname, repl[propval])
        elif isinstance(propclass, (properties.RangeProperty, properties.ShapeProperty)):
            setattr(node, pname, _replsym(list(propval), symrepl))
        elif isinstance(propclass, properties.CodeProperty):
            # Don't replace variables that appear as an input or an output
            # connector, as this should shadow the outer declaration.
            reduced_repl = set(repl.keys())
            if hasattr(node, 'in_connectors'):
                reduced_repl -= set(node.in_connectors.keys()) | set(node.out_connectors.keys())
            reduced_repl = {k: repl[k] for k in reduced_repl}
            code = propval.code
            if isinstance(code, str) and code:
                lang = propval.language
                if lang is dtypes.Language.CPP:  # Replace in C++ code
                    prefix = ''
                    tokenized = tokenize_cpp.findall(code)
                    for name, new_name in reduced_repl.items():
                        if name not in tokenized:
                            continue
                        # Use local variables and shadowing to replace
                        replacement = f'auto {name} = {cppunparse.pyexpr2cpp(new_name)};\n'
                        prefix = replacement + prefix
                    if prefix:
                        propval.code = prefix + code
                else:
                    warnings.warn('Replacement of %s with %s was not made '
                                  'for string tasklet code of language %s' % (name, new_name, lang))
            elif propval.code is not None:
                afr = ASTFindReplace(reduced_repl)
                for stmt in propval.code:
                    afr.visit(stmt)
        elif (isinstance(propclass, properties.DictProperty) and pname == 'symbol_mapping'):
            # Symbol mappings for nested SDFGs
            for symname, sym_mapping in propval.items():
                try:
                    propval[symname] = symbolic.pystr_to_symbolic(str(sym_mapping)).subs(symrepl)
                except AttributeError:  # If the symbolified value has no subs
                    pass