in retail/recommendation-system/bqml-scann/index_server/lookup.py [0:0]
def lookup(self, instances):
request_body = {'instances': instances}
response = self.service.projects().predict(name=self.name, body=request_body).execute()
if 'error' in response:
raise RuntimeError(response['error'])
return response['predictions']