<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def kpath_from_seekpath(cls, seekpath, point_coords):
 r"""Convert seekpath-formatted kpoints path to sumo-preferred format. If 'GAMMA' is used as a label this will be replaced by '\Gamma'. Args: seekpath (list):
 A :obj:`list` of 2-tuples containing the labels at each side of each segment of the k-point path:: where a break in the sequence is indicated by a non-repeating label. E.g.:: for a break between C and D. point_coords (dict):
 Dict of coordinates corresponding to k-point labels:: Returns: dict: The path and k-points as:: { } """

        # convert from seekpath format e.g. [(l1, l2), (l2, l3), (l4, l5)]
        # to our preferred representation [[l1, l2, l3], [l4, l5]]
        path = [[seekpath[0][0]]]
        for (k1, k2) in seekpath:
            if path[-1] and path[-1][-1] == k1:
                path[-1].append(k2)
            else:
                path.append([k1, k2])

        # Rebuild kpoints dictionary skipping any positions not on path
        # (chain(*list) flattens nested list; set() removes duplicates.)
        kpoints = {p: point_coords[p] for p in set(chain(*path))}

        # Every path should include Gamma-point. Change the label to \Gamma
        assert 'GAMMA' in kpoints
        kpoints[r'\Gamma'] = kpoints.pop('GAMMA')
        path = [[label.replace('GAMMA', r'\Gamma') for label in subpath]
                for subpath in path]

        return {'kpoints': kpoints, 'path': path}