code: def _combine_bounds(bbox1, bbox2):
      
      WORLD = {'west': -180, 'south': -85.1, 'east': 180, 'north': 85.1}
      ALL_KEYS = set(WORLD.keys())
  
      def dict_all_nones(bbox_dict):
          """Returns True if all dict values are None"""
          return all(v is None for v in bbox_dict.values())
  
      # if neither are defined, use the world
      if not bbox1 and not bbox2:
          return WORLD
      # if all nones, use the world
      if dict_all_nones(bbox1) and dict_all_nones(bbox2):
          return WORLD
  
      assert ALL_KEYS == set(bbox1.keys()) and ALL_KEYS == set(bbox2.keys()),\
          'Input bounding boxes must have the same dictionary keys'
      # create dict with cardinal directions and None-valued keys
      outbbox = dict.fromkeys(['west', 'south', 'east', 'north'])
  
      def conv2nan(val):
          """convert Nones to np.nans"""
          return np.nan if val is None else val
  
      # set values and/or defaults
      for coord in ('north', 'east'):
          outbbox[coord] = np.nanmax([
                  conv2nan(bbox1[coord]),
                  conv2nan(bbox2[coord])
              ])
      for coord in ('south', 'west'):
          outbbox[coord] = np.nanmin([
                  conv2nan(bbox1[coord]),
                  conv2nan(bbox2[coord])
              ])
  
      return outbbox
docs: Takes two bounding boxes dicts and gives a new bbox that encompasses
      them both