code: def apply_request(self, stream, ident, parent):
      self.log.warning(
          "apply_request is deprecated in kernel_base, moving to ipyparallel."
      )
      try:
          content = parent["content"]
          bufs = parent["buffers"]
          msg_id = parent["header"]["msg_id"]
      except:
          self.log.error("Got bad msg: %s", parent, exc_info=True)
          return
  
      md = self.init_metadata(parent)
  
      reply_content, result_buf = self.do_apply(
          content, bufs, msg_id, md
      )
  
      # flush i/o
      sys.stdout.flush()
      sys.stderr.flush()
  
      md = self.finish_metadata(parent, md, reply_content)
  
      self.session.send(
          stream,
          "apply_reply",
          reply_content,
          parent=parent,
          ident=ident,
          buffers=result_buf,
          metadata=md,
      )
  
imports: from __future__ import print_function
  import sys
  import time
  import logging
  import uuid
  from datetime import datetime
  from signal import signal, default_int_handler, SIGINT
  import zmq
  from tornado import ioloop
  from zmq.eventloop.zmqstream import ZMQStream
  from traitlets.config.configurable import SingletonConfigurable
  from IPython.core.error import StdinNotImplementedError
  from ipython_genutils import py3compat
  from ipython_genutils.py3compat import unicode_type, string_types
  from ipykernel.jsonutil import json_clean
  from traitlets import Any, Instance, Float, Dict, List, Set, Integer, Unicode, Bool, observe, default
  from jupyter_client.session import Session
  from ._version import kernel_protocol_version
label_desc: Use image node_id 35 for calling the Kernel obj's underlying member method code with example usage: obj.apply_request(stream, ident, parent) without return types