def METHOD_NAME(symlist, symrepl):
    """ Helper function to replace symbols in various symbolic expressions. """
    if symlist is None:
        return None
    if isinstance(symlist, (symbolic.SymExpr, symbolic.symbol, sp.Basic)):
        return _internal_replace(symlist, symrepl)
    for i, dim in enumerate(symlist):
        try:
            symlist[i] = tuple(_internal_replace(d, symrepl) for d in dim)
        except TypeError:
            symlist[i] = _internal_replace(dim, symrepl)
    return symlist