def plt_show(show=True, **kwargs):
 import matplotlib
 import matplotlib.pyplot as plt
 if (show and (matplotlib.get_backend() != 'agg')):
  plt.show(**kwargs)

def plt_show ( show = True , ** kwargs ) : import matplotlib import matplotlib . pyplot as plt if ( show and ( matplotlib . get_backend ( ) != 'agg' ) ) : plt . show ( ** kwargs )
helper to show a figure while suppressing warnings .