def get_tempfile_kwargs(tkwargs=None, prefix='', wrapped=None):
    'Updates kwargs to be passed to tempfile. calls depending on env vars\n    '
    if (tkwargs is None):
        tkwargs_ = {}
    else:
        tkwargs_ = tkwargs.copy()
    if ('prefix' not in tkwargs_):
        tkwargs_['prefix'] = '_'.join(((['datalad_temp'] + ([prefix] if prefix else [])) + ([''] if (on_windows or (not wrapped)) else [wrapped.__name__])))
    directory = os.environ.get('TMPDIR')
    if (directory and ('dir' not in tkwargs_)):
        tkwargs_['dir'] = directory
    return tkwargs_
Updates kwargs to be passed to tempfile. calls depending on env vars
def get_tempfile_kwargs(tkwargs=None, prefix=, wrapped=None):
    '\n    '
    if (tkwargs is None):
        tkwargs_ = {}
    else:
        tkwargs_ = tkwargs.copy()
    if ('prefix' not in tkwargs_):
        tkwargs_['prefix'] = '_'.join(((['datalad_temp'] + ([prefix] if prefix else [])) + ([] if (on_windows or (not wrapped)) else [wrapped.__name__])))
    directory = os.environ.get('TMPDIR')
    if (directory and ('dir' not in tkwargs_)):
        tkwargs_['dir'] = directory
    return tkwargs_