Recreating nbgrader demo

I try to recreate what the nbgrader demo_setup is creating (https://github.com/jupyter/nbgrader/blob/05bb458668e3a10136ba0b0df5f432ecab3f9ccb/demos/). But I miss some understanding about the JupyterHub to be able to do this.
In the demo it says:

Get the JupyterHub API token and update the JupyterHub config with it.

    local token=$(get_token "${jupyterhub_root}" "${admin}")
    local config="${jupyterhub_root}/jupyterhub_config.py"
    local new_config=$(sed "s/{{${course}_token}}/${token}/g" "${config}")
    echo "${new_config}" > "${config}"

And now I do wonder about the meanig of line: local token=$(get_token “${jupyterhub_root}” “${admin}”)
Where should I get the token, how and what options are to be given. The variable jupyterhub_root is set in the beginning, but I do not know to what it is set. Is it a path?