<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def calculate_leaf_paths(self):
 """Build map of reverse xrefs then traverse backwards marking path to leaf for all leaves. """

        reverse_xref = {}
        leaves = set()
        for v in self.value.values():
            if v.leaf:
                leaves.add(v)
            for xref in v.value_xref:
                reverse_xref.setdefault(xref, []).append(v.ident)
        for leaf in leaves:
            self.calculate_leaf_path(leaf, reverse_xref)