code: def is_available(cls, disk, kernel):
          
          kmap = cls.list(disk['datacenter_id'], None, kernel, True)
          for flavor in kmap:
              if kernel in kmap[flavor]:
                  return True
          return False
docs: Check if kernel is available for disk.