<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_rml(self, rml_name, rtn_format="filepath"):
 """ returns the rml mapping filepath rml_name(str):
 Name of the rml mapping to retrieve rtn_format: ['filepath', 'data'] """


        try:
            rml_path = self.rml_maps[rml_name]
        except KeyError:
            if rml_name in self.rml_maps.values() or os.path.exists(rml_name):
                rml_path = rml_name
            else:
                raise LookupError("rml_name '%s' is not registered" % rml_name)
        if rtn_format == "data":
            with open(rml_path, "rb") as fo:
                return fo.read()
        return rml_path