<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _read_syncmap_file(self, path, extension, text=False):
 """ Read labels from a SyncMap file """

        syncmap = SyncMap(logger=self.logger)
        syncmap.read(extension, path, parameters=None)
        if text:
            return [(f.begin, f.end, u" ".join(f.text_fragment.lines)) for f in syncmap.fragments]
        return [(f.begin, f.end, f.text_fragment.identifier) for f in syncmap.fragments]