<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_scc_from_tuples(constraints):
 """Given set of equivalences, return map of transitive equivalence classes. >> constraints = [(1,2), (2,3)] >> get_scc_from_tuples(constraints) { 1: (1, 2, 3), 2: (1, 2, 3), 3: (1, 2, 3), } """

    classes = unionfind.classes(constraints)
    return dict((x, tuple(c)) for x, c in classes.iteritems())