class_docstr: Image database.
class_docstr_tok: ["Image","database","."]
code: def merge_roidbs(a, b):
      assert len(a) == len(b)
      for i in range(len(a)):
          if a[i]:  # if image has at least one annotated object
              a[i]["boxes"] = np.vstack((a[i]["boxes"], b[i]["boxes"]))
              a[i]["gt_classes"] = np.hstack(
                  (a[i]["gt_classes"], b[i]["gt_classes"])
              )
              a[i]["gt_overlaps"] = scipy.sparse.vstack(
                  [a[i]["gt_overlaps"], b[i]["gt_overlaps"]]
              )
          else:
              a[i] = b[i]
      return a
  
imports: import os
  import os.path
  import PIL
  import numpy
  import scipy.sparse
  from builtins import range
  import sys
  from .utils.cython_bbox import bbox_overlaps
label_desc: Use image node_id 16 for calling the imdb obj's underlying member method code with example usage: obj.merge_roidbs(a, b) and returns: a