https://github.com/pkathail/magic/blob/develop/R/run_magic.R
https://github.com/pkathail/magic/blob/develop/R/run_magic.R