code: def __init__(self, *args, **env):
      # Let stderr through to let pytest display it separately on errors
      gdb_env = environment_for_gdb()
      gdb_env.update(env)
      self.proc = subprocess.Popen(
          gdb_command + list(args),
          env=gdb_env,
          bufsize=0,
          stdin=subprocess.PIPE,
          stdout=subprocess.PIPE,
      )
      self.last_stdout = []
      self.last_stdout_line = b""
  
imports: from functools import lru_cache
  import os
  import re
  import shutil
  import subprocess
  import sys
  import pytest
  import pyarrow
label_desc: Use image node_id 1 to create a new GdbSession object  with example: obj = GdbSession()