<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_rml(self, rml_name):
 """ loads an rml mapping into memory args: rml_name(str):
 the name of the rml file """

        conn = CFG.rml_tstore
        cache_path = os.path.join(CFG.CACHE_DATA_PATH, 'rml_files', rml_name)
        if not os.path.exists(cache_path):
            results = get_graph(NSM.uri(getattr(NSM.kdr, rml_name), False),
                                conn)
            with open(cache_path, "w") as file_obj:
                file_obj.write(json.dumps(results, indent=4))
        else:
            results = json.loads(open(cache_path).read())
        self.rml[rml_name] = RdfDataset(results)
        return self.rml[rml_name]