code: def close(self):
          
          self.out_stream.close()
          # If we're asked to write in place, substitute the named
          # temporary file for the current file
          if self.in_place:
              shutil.move(self.temp_file.name, self.out)
docs: Close the stream. Assumes stream has 'close' method.