parameters: (nb)
docstring: Replace all occurrences of the magic command ``%matplotlib notebook``
      by ``%matplotlib inline``.
docstring_summary: Replace all occurrences of the magic command ``%matplotlib notebook``
      by ``%matplotlib inline``.
docstring_tokens: Replace all occurrences of the magic command %matplotlib notebook by %matplotlib inline .
function: def disable_plot_interactivity(nb):
      """
      Replace all occurrences of the magic command ``%matplotlib notebook``
      by ``%matplotlib inline``.
      """
      for cell in nb['cells']:
          if cell['cell_type'] == 'code' and 'matplotlib' in cell['source']:
              cell['source'] = re.sub('^%matplotlib +notebook',
                                      '%matplotlib inline',
                                      cell['source'], flags=re.M)
function_tokens: def disable_plot_interactivity ( nb ) : for cell in nb [ 'cells' ] : if cell [ 'cell_type' ] == 'code' and 'matplotlib' in cell [ 'source' ] : cell [ 'source' ] = re . sub ( '^%matplotlib +notebook' , '%matplotlib inline' , cell [ 'source' ] , flags = re . M )