docstr: Get img ids that satisfy given filter conditions.
  :param imgIds (int array) : get imgs for given ids
  :param catIds (int array) : get imgs with all given cats
  :return: ids (int array)  : integer array of img ids
docstr_tok: ["Get","img","ids","that","satisfy","given","filter","conditions",".",":","param","imgIds","(","int","array",")",":","get","imgs","for","given","ids",":","param","catIds","(","int","array",")",":","get","imgs","with","all","given","cats",":","return",":","ids","(","int","array",")",":","integer","array","of","img","ids"]
code: def getImgIds(self, imgIds=[], catIds=[]):
      """
      Get img ids that satisfy given filter conditions.
      :param imgIds (int array) : get imgs for given ids
      :param catIds (int array) : get imgs with all given cats
      :return: ids (int array)  : integer array of img ids
      """
      imgIds = imgIds if type(imgIds) == list else [imgIds]
      catIds = catIds if type(catIds) == list else [catIds]
  
      if len(imgIds) == len(catIds) == 0:
          ids = self.imgs.keys()
      else:
          ids = set(imgIds)
          for i, catId in enumerate(catIds):
              if i == 0 and len(ids) == 0:
                  ids = set(self.catToImgs[catId])
              else:
                  ids &= set(self.catToImgs[catId])
      return list(ids)
  
imports: import json
  import time
  import matplotlib.pyplot
  from matplotlib.collections import PatchCollection
  from matplotlib.patches import Polygon
  import numpy
  import copy
  import itertools
  from .None import mask
  import os
  from collections import defaultdict
  import sys
label_desc: Use image node_id 6 for calling the COCO obj's underlying member method code with example usage: obj.getImgIds(imgIds, catIds) and returns: list