If you already have root privilages and need sudo only to run existing code using sudo, then alias can be used as below:
alias sudo="$($1)"