def run_script(script, localvars=None):
    """
    Execute a given project script in the current context.

    Parameters
    ----------
    script : script instance
        The script to execute.
    localvars : dict, optional
        If provided it will be used for evaluating the script. In general,
        it can be `localvrs`=``locals()``.

    Returns
    -------
    out
        Output of the script if any
    """

    return script.execute(localvars)