code: def openpty():
      """openpty() -> (master_fd, slave_fd)
      Open a pty master/slave pair, using os.openpty() if possible."""
  
      try:
          return os.openpty()
      except (AttributeError, OSError):
          pass
      master_fd, slave_name = _open_terminal()
      slave_fd = slave_open(slave_name)
      return master_fd, slave_fd
  
file_path: catboost/contrib/tools/python3/src/Lib/pty.py
imports: from select import select
  import os
  import sys
  import tty
  from os import close, waitpid
  from tty import setraw, tcgetattr, tcsetattr
label_desc: Use image node_id 1 for calling a global function with example usage: openpty() and returns: master_fd,  slave_fd, os