docstr: Execute a block, or store it in a variable, per the user's request.
          
docstr_tok: ["Execute","a","block",",","or","store","it","in","a","variable",",","per","the","user","'s","request","."]
code: def store_or_execute(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
  
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 2 for calling the TerminalMagics obj's underlying member method code with example usage: obj.store_or_execute(block, name) without return types