code: def notebook_mode(m):
      
      global NOTEBOOK_MODE
      global TRANGE
      NOTEBOOK_MODE = m
      if NOTEBOOK_MODE:
          TRANGE = tqdm.tnrange
      else:
          TRANGE = tqdm.trange
docs: 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