<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def notebook_mode(m):
 """ Configure whether this module should assume that it is being run from a jupyter notebook. This sets some global variables related to how progress for long measurement sequences is indicated. :param bool m: If True, assume to be in notebook. :return: None :rtype: NoneType """

    global NOTEBOOK_MODE
    global TRANGE
    NOTEBOOK_MODE = m
    if NOTEBOOK_MODE:
        TRANGE = tqdm.tnrange
    else:
        TRANGE = tqdm.trange