def change_kernel(self, kernel, return_dict=True):
if type(kernel) != Kernel:<EOL><INDENT>raise BadKernelObject("<STR_LIT>")<EOL><DEDENT>return self._perform_action(<EOL>{'<STR_LIT:type>': '<STR_LIT>', '<STR_LIT>': kernel.id},<EOL>return_dict<EOL>)<EOL>
Change the kernel to a new one

        Args:
            kernel : instance of digitalocean.Kernel.Kernel

        Optional Args:
            return_dict (bool): Return a dict when True (default),
                otherwise return an Action.

        Returns dict or Action