docstr: Get ann ids that satisfy given filter conditions. default skips that filter
  :param imgIds  (int array)     : get anns for given imgs
         catIds  (int array)     : get anns for given cats
         areaRng (float array)   : get anns for given area range (e.g. [0 inf])
         iscrowd (boolean)       : get anns for given crowd label (False or True)
  :return: ids (int array)       : integer array of ann ids
docstr_tok: ["Get","ann","ids","that","satisfy","given","filter","conditions",".","default","skips","that","filter",":","param","imgIds","(","int","array",")",":","get","anns","for","given","imgs","catIds","(","int","array",")",":","get","anns","for","given","cats","areaRng","(","float","array",")",":","get","anns","for","given","area","range","(","e.g",".","[","0","inf","]",")","iscrowd","(","boolean",")",":","get","anns","for","given","crowd","label","(","False","or","True",")",":","return",":","ids","(","int","array",")",":","integer","array","of","ann","ids"]
code: def getAnnIds(self, imgIds=[], catIds=[], areaRng=[], iscrowd=None):
      """
      Get ann ids that satisfy given filter conditions. default skips that filter
      :param imgIds  (int array)     : get anns for given imgs
             catIds  (int array)     : get anns for given cats
             areaRng (float array)   : get anns for given area range (e.g. [0 inf])
             iscrowd (boolean)       : get anns for given crowd label (False or True)
      :return: ids (int array)       : integer array of ann ids
      """
      imgIds = imgIds if type(imgIds) == list else [imgIds]
      catIds = catIds if type(catIds) == list else [catIds]
  
      if len(imgIds) == len(catIds) == len(areaRng) == 0:
          anns = self.dataset["annotations"]
      else:
          if not len(imgIds) == 0:
              lists = [
                  self.imgToAnns[imgId]
                  for imgId in imgIds
                  if imgId in self.imgToAnns
              ]
              anns = list(itertools.chain.from_iterable(lists))
          else:
              anns = self.dataset["annotations"]
          anns = (
              anns
              if len(catIds) == 0
              else [ann for ann in anns if ann["category_id"] in catIds]
          )
          anns = (
              anns
              if len(areaRng) == 0
              else [
                  ann
                  for ann in anns
                  if ann["area"] > areaRng[0]
                  and ann["area"] < areaRng[1]
              ]
          )
      if not iscrowd == None:
          ids = [ann["id"] for ann in anns if ann["iscrowd"] == iscrowd]
      else:
          ids = [ann["id"] for ann in anns]
      return 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 4 for calling the COCO obj's underlying member method code with example usage: obj.getAnnIds(imgIds, catIds, areaRng, iscrowd) and returns: ids