code: def find_connection_file(filename="kernel-*.json", profile=None):
      """DEPRECATED: find a connection file, and return its absolute path.
  
      THIS FUNCION IS DEPRECATED. Use juptyer_client.find_connection_file instead.
  
      Parameters
      ----------
      filename : str
          The connection file or fileglob to search for.
      profile : str [optional]
          The name of the profile to use when searching for the connection file,
          if different from the current IPython session or 'default'.
  
      Returns
      -------
      str : The absolute path of the connection file.
      """
  
      import warnings
  
      warnings.warn(
          """ipykernel.find_connection_file is deprecated, use jupyter_client.find_connection_file""",
          DeprecationWarning,
          stacklevel=2,
      )
      from IPython.core.application import (
          BaseIPythonApplication as IPApp,
      )
  
      try:
          # quick check for absolute path, before going through logic
          return filefind(filename)
      except IOError:
          pass
  
      if profile is None:
          # profile unspecified, check if running from an IPython app
          if IPApp.initialized():
              app = IPApp.instance()
              profile_dir = app.profile_dir
          else:
              # not running in IPython, use default profile
              profile_dir = ProfileDir.find_profile_dir_by_name(
                  get_ipython_dir(), "default"
              )
      else:
          # find profiledir by profile name:
          profile_dir = ProfileDir.find_profile_dir_by_name(
              get_ipython_dir(), profile
          )
      security_dir = profile_dir.security_dir
  
      return jupyter_client.find_connection_file(
          filename, path=[".", security_dir]
      )
  
file_path: catboost/contrib/python/ipykernel/py2/ipykernel/connect.py
imports: from __future__ import absolute_import
  import json
  import sys
  from subprocess import Popen, PIPE
  import warnings
  from IPython.core.profiledir import ProfileDir
  from IPython.paths import get_ipython_dir
  from ipython_genutils.path import filefind
  from ipython_genutils.py3compat import str_to_bytes, PY3
  import jupyter_client
  from jupyter_client import write_connection_file
label_desc: Use image node_id 2 for calling a global function with example usage: find_connection_file(filename, profile) and returns: jupyter_client, filefind