code: def check_gap(xpub, api_key):
      
      params = {'key': api_key, 'xpub': xpub}
      resource = 'v2/receive/checkgap?' + util.urlencode(params)
      resp = util.call_api(resource, base_url='https://api.blockchain.info/')
      json_resp = json.loads(resp)
      return json_resp['gap']
docs: Call the 'v2/receive/checkgap' endpoint and returns the callback log
      for a given callback URI with parameters.
  
      :param str xpub: extended public key
      :param str api_key: Blockchain.info API V2 key
      :return: an int