code: def get_index_quote(self, code, as_json=False):
          
          url = self.index_url
          if self.is_valid_index(code):
              req = Request(url, None, self.headers)
              # raises HTTPError and URLError
              resp = self.opener.open(req)
              resp = byte_adaptor(resp)
              resp_list = json.load(resp)['data']
              # this is list of dictionaries
              resp_list = [self.clean_server_response(item)
                           for item in resp_list]
              # search the right list element to return
              search_flag = False
              for item in resp_list:
                  if item['name'] == code.upper():
                      search_flag = True
                      break
              return self.render_response(item, as_json) if search_flag else None
docs: params:
              code : string index code
              as_json: True|False
          returns:
              a dict | json quote for the given index