<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete_reference(self, opaque_ref, global_ref=False):
 """ Delete the stored mapping of a reference. :param opaque_ref: Reference which should be removed. :param bool global_ref: Whether opaque_ref is a local or global reference. """

        opaque_ref_value = self._get_reference_value(opaque_ref)
        if global_ref:
            del self.global_refs[opaque_ref_value]
        else:
            del self.local_refs[opaque_ref_value]