docs: def run_git_concurrently(base_dir):
      """Runs the 'git status' and 'git pull' commands in threads and reports
      the results in a pretty table."""
      os.chdir(base_dir)
      git_dirs = get_list_of_git_directories()
      print("Processing %d git repos: %s" % (len(git_dirs), ', '.join(git_dirs)))
  
      widgets = [Percentage(),
                 ' ', Bar(),
                 ' ', Counter(),
                 ' ', AdaptiveETA()]
  
      pbar = ProgressBar(widgets=widgets, maxval=len(git_dirs))
      pbar.start()
  
      threads = {git_dir:GitPuller(git_dir) for git_dir in git_dirs}
      for thread in threads.values():
          thread.start()
  
      while True:
          pbar.update(len([t for t in threads.values() if not t.is_alive()]))
          if all([not t.is_alive() for t in threads.values()]):
              break
          time.sleep(0.2)
  
      table = PrettyTable(["repo", "local", "pull"])
      table.align["repo"] = "l"
      table.align["local"] = "l"
      table.align["pull"] = "l"
  
      for git_dir in sorted(threads):
          thread = threads[git_dir]
          if thread.local_ok:
              if thread.has_uncommitted_changes:
                  local_changes_text = colored(
                      'Uncommitted changes', 'green', attrs=['bold'])
              else:
                  local_changes_text = colored('OK', 'green')
          else:
              local_changes_text = colored('Problem', 'red')
  
          if thread.git_pull_ok:
              if thread.is_up_to_date:
                  pull_text = colored('OK', 'green')
              else:
                  pull_text = colored('Changed', 'green', attrs=['bold'])
          else:
              pull_text = colored('Problem', 'red')
  
          table.add_row([git_dir, local_changes_text, pull_text])
  
      print(table)
      for git_dir in sorted(threads):
          if not threads[git_dir].git_pull_ok:
              thread = threads[git_dir]
              print colored('%s: ' % git_dir, 'red')
              print thread.git_pull_output