docstr: Download COCO images from mscoco.org server.
  :param tarDir (str): COCO results directory name
         imgIds (list): images to be downloaded
  :return:
docstr_tok: ["Download","COCO","images","from","mscoco.org","server",".",":","param","tarDir","(","str",")",":","COCO","results","directory","name","imgIds","(","list",")",":","images","to","be","downloaded",":","return",":"]
code: def download(self, tarDir=None, imgIds=[]):
      """
      Download COCO images from mscoco.org server.
      :param tarDir (str): COCO results directory name
             imgIds (list): images to be downloaded
      :return:
      """
      if tarDir is None:
          print("Please specify target directory")
          return -1
      if len(imgIds) == 0:
          imgs = self.imgs.values()
      else:
          imgs = self.loadImgs(imgIds)
      N = len(imgs)
      if not os.path.exists(tarDir):
          os.makedirs(tarDir)
      for i, img in enumerate(imgs):
          tic = time.time()
          fname = os.path.join(tarDir, img["file_name"])
          if not os.path.exists(fname):
              urlretrieve(img["coco_url"], fname)
          print(
              "downloaded {}/{} images (t={:0.1f}s)".format(
                  i, N, time.time() - tic
              )
          )
  
imports: import json
  import time
  import matplotlib.pyplot
  from matplotlib.collections import PatchCollection
  from matplotlib.patches import Polygon
  import numpy
  import copy
  import itertools
  import os
  import os.path
  from collections import defaultdict
  import sys
  from datetime import datetime
label_desc: Use image node_id 21 for calling the COCO obj's underlying member method code with example usage: obj.download(tarDir, imgIds) and returns: unknown