code: def _find_cmd(cmd):
      """Find the full path to a command using which."""
  
      path = sp.Popen(
          ["/usr/bin/env", "which", cmd], stdout=sp.PIPE, stderr=sp.PIPE
      ).communicate()[0]
      return py3compat.bytes_to_str(path)
  
file_path: catboost/contrib/python/ipython/py2/IPython/utils/_process_posix.py
imports: from __future__ import print_function
  import errno
  import os
  import subprocess
  import sys
  import pexpect
  from ._process_common import getoutput, arg_split
  from IPython.utils import py3compat
  from IPython.utils.encoding import DEFAULT_ENCODING
label_desc: Use image node_id 1 for calling a global function with example usage: _find_cmd(cmd) and returns: py3compat