'If the user is trying to change Matplotlib backends with
%matplotlib, send the same command again to the kernel to
correctly change it.
Fixes issue 4002'

def change_mpl_backend(self, command):

    if (command.startswith('%matplotlib') and (len(command.splitlines()) == 1)):
        if (not ('inline' in command)):
            self.silent_execute(command)
