code: def load_nb(cls, inline=True):
          
          import matplotlib.pyplot as plt
          backend = plt.get_backend()
          if backend not in ['agg', 'module://ipykernel.pylab.backend_inline']:
              plt.switch_backend('agg')
docs: Initialize matplotlib backend