code: def get_gdb_full_backtrace(binary, core, gdb_path):
      # XXX ya tool gdb uses shell script as wrapper so we need directory with shell binary in PATH
      os.environ["PATH"] = os.pathsep.join(
          filter(None, [os.environ.get("PATH"), "/bin"])
      )
      cmd = [
          gdb_path,
          binary,
          core,
          "--eval-command",
          "set print thread-events off",
          "--eval-command",
          "thread apply all backtrace full",
          "--batch",
          "--quiet",
      ]
      proc = subprocess.Popen(
          cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE
      )
      output, stderr = proc.communicate()
      output = six.ensure_str(output)
      if stderr:
          output += "\nstderr >>\n" + six.ensure_str(stderr)
      return output
  
file_path: catboost/library/python/cores/__init__.py
imports: import os
  import re
  import glob
  import socket
  import logging
  import platform
  import subprocess
  import six
  from library.python.reservoir_sampling import reservoir_sampling
label_desc: Use image node_id 3 for calling a global function with example usage: get_gdb_full_backtrace(binary, core, gdb_path) and returns: output