def __init__(self):
    if (file_ is None):
        kw = get_tempfile_kwargs({}, prefix='logs')
        self._out = NamedTemporaryFile(mode='a', delete=False, **kw)
    else:
        out_file = file_
        self._out = open(out_file, 'a')
    self._final_out = None
def __init__(self):
    if (file_ is None):
        kw = get_tempfile_kwargs({}, prefix='logs')
        self._out = NamedTemporaryFile(mode='a', delete=False, **kw)
    else:
        out_file = file_
        self._out = open(out_file, 'a')
    self._final_out = None