docstr: Rerun a previously pasted command.
          
docstr_tok: ["Rerun","a","previously","pasted","command","."]
code: def rerun_pasted(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, py3compat.string_types):
          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)
  
file_path: catboost/contrib/python/ipython/py2/IPython/terminal/magics.py
imports: from __future__ import print_function
  from logging import error
  import os
  import sys
  from IPython.core.error import TryNext, UsageError
  from IPython.core.inputsplitter import IPythonInputSplitter
  from IPython.core.magic import Magics, magics_class, line_magic
  from IPython.lib.clipboard import ClipboardEmpty
  from IPython.utils.text import SList, strip_email_quotes
  from IPython.utils import py3compat
label_desc: Use image node_id 4 for calling the TerminalMagics obj's underlying member method code with example usage: obj.rerun_pasted(name) without return types