def set_mode(how):
    """ Sets the behavior of the API

    :param how: if 'remote' all the execution is performed on the remote server; if 'local' all
           it is executed locally. Default = 'local'
    :return: None
    """
    global __mode
    if how == 'local':
        __mode = how
    elif how == 'remote':
        __mode = how
    else:
        raise ValueError("how must be 'local' or 'remote'")
