def METHOD_NAME(self, name='pasted_block'):
    """ Rerun a previously pasted command.
    """
    b = self.shell.user_ns.get(name)
    # Sanity checks
    if b is None:
        raise UsageError('No previous pasted block available')
    if not isinstance(b, str):
        raise UsageError(
            "Variable 'pasted_block' is not a string, can't execute")
    print("Re-executing '%s...' (%d chars)"% (b.split('\n',1)[0], len(b)))
    self.shell.run_cell(b)