code: def import_pylab(user_ns, import_all=True):
      """Populate the namespace with pylab-related values.
  
      Imports matplotlib, pylab, numpy, and everything from pylab and numpy.
  
      Also imports a few names from IPython (figsize, display, getfigs)
  
      """
  
      # Import numpy as np/pyplot as plt are conventions we're trying to
      # somewhat standardize on.  Making them available to users by default
      # will greatly help this.
      s = (
          "import numpy\n"
          "import matplotlib\n"
          "from matplotlib import pylab, mlab, pyplot\n"
          "np = numpy\n"
          "plt = pyplot\n"
      )
      exec(s, user_ns)
  
      if import_all:
          s = "from matplotlib.pylab import *\n" "from numpy import *\n"
          exec(s, user_ns)
  
      # IPython symbols to add
      user_ns["figsize"] = figsize
      from IPython.display import display
  
      # Add display and getfigs to the user's namespace
      user_ns["display"] = display
      user_ns["getfigs"] = getfigs
  
file_path: catboost/contrib/python/ipython/py3/IPython/core/pylabtools.py
imports: from io import BytesIO
  from binascii import b2a_base64
  from functools import partial
  import warnings
  from IPython.core.display import _pngxy
  from IPython.utils.decorators import flag_calls
label_desc: Use image node_id 10 for calling a global function with example usage: import_pylab(user_ns, import_all) without return types