def METHOD_NAME(self, block, name):
    """ Execute a block, or store it in a variable, per the user's request.
    """
    if name:
        # If storing it for further editing
        self.shell.user_ns[name] = SList(block.splitlines())
        print("Block assigned to '%s'" % name)
    else:
        b = self.preclean_input(block)
        self.shell.user_ns['pasted_block'] = b
        self.shell.using_paste_magics = True
        try:
            self.shell.run_cell(b)
        finally:
            self.shell.using_paste_magics = False