def get(self, k, wait=False, wait_index=False, timeout='<STR_LIT>'):
k = k.lstrip('<STR_LIT:/>')<EOL>url = '<STR_LIT>'.format(self.endpoint, k)<EOL>params = {}<EOL>if wait:<EOL><INDENT>params['<STR_LIT:index>'] = wait_index<EOL>params['<STR_LIT>'] = timeout<EOL><DEDENT>r = requests.get(url, params=params)<EOL>if r.status_code == <NUM_LIT>:<EOL><INDENT>raise KeyDoesNotExist("<STR_LIT>" + k + "<STR_LIT>")<EOL><DEDENT>if r.status_code != <NUM_LIT:200>:<EOL><INDENT>raise KVStoreError('<STR_LIT>'.format(r.status_code))<EOL><DEDENT>try:<EOL><INDENT>return base64.b64decode(r.json()[<NUM_LIT:0>]['<STR_LIT>'])<EOL><DEDENT>except TypeError as e:<EOL><INDENT>return "<STR_LIT>"<EOL><DEDENT>
Get the value of a given key