human
Complete the below
def copy_dir(source, dest, vars, verbosity, simulate, indent=0, sub_vars=True, interactive=False, overwrite=True, template_renderer=None, out_=sys.stdout):

    ''''Copies the ``source`` directory to the ``dest`` directory.
    ``vars``: A dictionary of variables to use in any substitutions.
    ``verbosity``: Higher numbers will show more about what is happening.
    ``simulate``: If true, then don\'t actually *do* anything.
    ``indent``: Indent any messages by this amount.
    ``sub_vars``: If true, variables in ``_tmpl`` files and ``+var+``
    in filenames will be substituted.
    ``overwrite``: If false, then don\'t every overwrite anything.
    ``interactive``: If you are overwriting a file and interactive is
    true, then ask before overwriting.
    ``template_renderer``: This is a function for rendering templates (if you
    don\'t want to use string.Template).  It should have the signature
    ``template_renderer(content_as_string, vars_as_dict,
    filename=filename)``.'
    '''
 ... Give me a happening?
assistant
#Here is happening.
    def out(msg):
        out_.write(msg)
        out_.write('\n')
        out_.flush()
    vars.setdefault('dot', '.')
    vars.setdefault('plus', '+')
    use_pkg_resources = isinstance(source, tuple)
    if use_pkg_resources:
        names = sorted(pkg_resources.resource_listdir(source[0], source[1]))
    else:
        names = sorted(os.listdir(source))
    pad = ('    ' * (indent * 2))
    if (not os.path.exists(dest)):
        if (verbosity >= 1):
            out(('%sCreating    %s/' % (pad, dest)))
        if (not simulate):
            makedirs(dest, verbosity=verbosity, pad=pad)
    elif (verbosity >= 2):
        out(('%sDirectory    %s    exists' % (pad, dest)))
    for name in names:
        if use_pkg_resources:
            full = '/'.join([source[1], name])
        else:
            full = os.path.join(source, name)
        reason = should_skip_file(name)
        if reason:
            if (verbosity >= 2):
                reason = (pad + (reason % {'filename': full}))
                out(reason)
            continue
        if sub_vars:
            dest_full = os.path.join(dest, substitute_filename(name, vars))
        sub_file = False
        if dest_full.endswith('_tmpl'):
            dest_full = dest_full[:(-5)]
            sub_file = sub_vars
        if (use_pkg_resources and pkg_resources.resource_isdir(source[0], full)):
            if verbosity:
                out(('%sRecursing    into    %s' % (pad, os.path.basename(full))))
            copy_dir((source[0], full), dest_full, vars, verbosity, simulate, indent=(indent + 1), sub_vars=sub_vars, interactive=interactive, overwrite=overwrite, template_renderer=template_renderer, out_=out_)
            continue
        elif ((not use_pkg_resources) and os.path.isdir(full)):
            if verbosity:
                out(('%sRecursing    into    %s' % (pad, os.path.basename(full))))
            copy_dir(full, dest_full, vars, verbosity, simulate, indent=(indent + 1), sub_vars=sub_vars, interactive=interactive, overwrite=overwrite,...