class_docstr: This class represents a process running in a pseudoterminal.
  
  The main constructor is the :meth:`spawn` classmethod.
docstr: This closes the connection with the child application. Note that
  calling close() more than once is valid. This emulates standard Python
  behavior with files. Set force to True if you want to make sure that
  the child is terminated (SIGKILL is sent if the child ignores SIGHUP
  and SIGINT). 
docstr_tok: ["This","closes","the","connection","with","the","child","application",".","Note","that","calling","close","(",")","more","than","once","is","valid",".","This","emulates","standard","Python","behavior","with","files",".","Set","force","to","True","if","you","want","to","make","sure","that","the","child","is","terminated","(","SIGKILL","is","sent","if","the","child","ignores","SIGHUP","and","SIGINT",")","."]
code: def close(self, force=True):
      """This closes the connection with the child application. Note that
      calling close() more than once is valid. This emulates standard Python
      behavior with files. Set force to True if you want to make sure that
      the child is terminated (SIGKILL is sent if the child ignores SIGHUP
      and SIGINT)."""
      if not self.closed:
          self.flush()
          self.fileobj.close()  # Closes the file descriptor
          # Give kernel time to update process status.
          time.sleep(self.delayafterclose)
          if self.isalive():
              if not self.terminate(force):
                  raise PtyProcessError(
                      "Could not terminate the child."
                  )
          self.fd = -1
          self.closed = True
  
imports: import codecs
  import errno
  import fcntl
  import io
  import os
  import pty
  import resource
  import signal
  import struct
  import sys
  import termios
  import time
  from pty import STDIN_FILENO, CHILD
  from .util import which, PtyProcessError
label_desc: Use image node_id 8 for calling the PtyProcess obj's underlying member method code with example usage: obj.close(force) without return types