class_docstr: This is like pexpect.spawn but allows you to supply your own open file
  descriptor. For example, you could use it to read through a file looking
  for patterns, or to control a modem or serial device. 
class_docstr_tok: ["This","is","like","pexpect.spawn","but","allows","you","to","supply","your","own","open","file","descriptor",".","For","example",",","you","could","use","it","to","read","through","a","file","looking","for","patterns",",","or","to","control","a","modem","or","serial","device","."]
docstr: Close the file descriptor.
  
  Calling this method a second time does nothing, but if the file
  descriptor was closed elsewhere, :class:`OSError` will be raised.
docstr_tok: ["Close","the","file","descriptor",".","Calling","this","method","a","second","time","does","nothing",",","but","if","the","file","descriptor","was","closed","elsewhere",",",":","class",":","`","OSError","`","will","be","raised","."]
code: def close(self):
      """Close the file descriptor.
  
      Calling this method a second time does nothing, but if the file
      descriptor was closed elsewhere, :class:`OSError` will be raised.
      """
      if self.child_fd == -1:
          return
  
      self.flush()
      os.close(self.child_fd)
      self.child_fd = -1
      self.closed = True
  
file_path: catboost/contrib/python/pexpect/py2/pexpect/fdpexpect.py
imports: from .spawnbase import SpawnBase
  from .exceptions import ExceptionPexpect, TIMEOUT
  from .utils import select_ignore_interrupts, poll_ignore_interrupts
  import os
label_desc: Use image node_id 2 for calling the fdspawn obj's underlying member method code with example usage: obj.close() without return types