<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_genes_for_hgnc_id(self, hgnc_symbol):
 """ obtain the ensembl gene IDs that correspond to a HGNC symbol """

        
        headers = {"content-type": "application/json"}
        
        # http://grch37.rest.ensembl.org/xrefs/symbol/homo_sapiens/KMT2A?content-type=application/json
        
        self.attempt = 0
        ext = "/xrefs/symbol/homo_sapiens/{}".format(hgnc_symbol)
        r = self.ensembl_request(ext, headers)
        
        genes = []
        for item in json.loads(r):
            if item["type"] == "gene":
                genes.append(item["id"])
        
        return genes