original_docstring: 
      Function to get google_id and wikipedia URL from Google Knowledge Graph with search term query
      
docstring: Function to get google_id and wikipedia URL from Google Knowledge Graph with search term query
docstring_tokens: Function to get google_id and wikipedia URL from Google Knowledge Graph with search term query
code: def gkg_search(rep, entities):
      '''
      Function to get google_id and wikipedia URL from Google Knowledge Graph with search term query
      '''
      
      query = f"{rep['first_name']} {rep['last_name']} politician"
      r = entities.search(query=query).execute()
      result = r['itemListElement'][0]['result']
      _id = result['@id']
      gid = re.search('(?<=:).*', _id)[0]
      try:
          wiki_url = result['detailedDescription']['url']
      except:
          wiki_url = None
      
      return gid, wiki_url
code_tokens: def gkg_search ( rep , entities ) : query = f"{rep['first_name']} {rep['last_name']} politician" r = entities . search ( query = query ) . execute ( ) result = r [ 'itemListElement' ] [ 0 ] [ 'result' ] _id = result [ '@id' ] gid = re . search ( '(?<=:).*' , _id ) [ 0 ] try : wiki_url = result [ 'detailedDescription' ] [ 'url' ] except : wiki_url = None return gid , wiki_url
short_docstring: Function to get google_id and wikipedia URL from Google Knowledge Graph with search term query
short_docstring_tokens: Function to get google_id and wikipedia URL from Google Knowledge Graph with search term query
comment: '''
      Function to get google_id and wikipedia URL from Google Knowledge Graph with search term query
      '''