human
Complete the below
def log(repo='.', paths=None, outstream=sys.stdout, max_entries=None, reverse=False, name_status=False):

    ''''Write commit logs.
    :param repo: Path to repository
    :param paths: Optional set of specific paths to print entries for
    :param outstream: Stream to write log output to
    :param reverse: Reverse order in which entries are printed
    :param name_status: Print name status
    :param max_entries: Optional maximum number of entries to display'
    '''

Write me a Python code to print name status?
assistant
#Here is Python code to print name status
.
    with open_repo_closing(repo) as r:
        walker = r.get_walker(max_entries=max_entries, paths=paths, reverse=reverse)
        for entry in walker:
            def decode(x):
                return commit_decode(entry.commit, x)
            print_commit(entry.commit, decode, outstream)
            if name_status:
                outstream.writelines([(l + '\n') for l in print_name_status(entry.changes())])