class_docstr: This is the main class interface for Pexpect. Use this class to start
  and control child applications. 
class_docstr_tok: ["This","is","the","main","class","interface","for","Pexpect",".","Use","this","class","to","start","and","control","child","applications","."]
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)."""
  
      self.flush()
      with _wrap_ptyprocess_err():
          # PtyProcessError may be raised if it is not possible to terminate
          # the child.
          self.ptyproc.close(force=force)
      self.isalive()  # Update exit status from ptyproc
      self.child_fd = -1
      self.closed = True
  
imports: import os
  import sys
  import time
  import pty
  import tty
  import errno
  import signal
  from contextlib import contextmanager
  import ptyprocess
  from ptyprocess.ptyprocess import use_native_pty_fork
  from .exceptions import ExceptionPexpect, EOF, TIMEOUT
  from .spawnbase import SpawnBase
  from .utils import which, split_command_line, select_ignore_interrupts, poll_ignore_interrupts
label_desc: Use image node_id 5 for calling the spawn obj's underlying member method code with example usage: obj.close(force) without return types