def parse_imports(self, src):
        " Parse imports from source. "
        result = []

        def child(obj):
            result.append(obj.group(1))
        src = self.import_re.sub(child, src)
        return src, result