def _load_repo(full_path):
    name = full_path.split(os.path.sep)[-1].split('.')[0]
    repo = {name: []}

    with open(full_path, 'r') as fd:
        for line in fd:
            tmp_repo = {}
            if not line:
                break
            elements = line.split()
            if len(elements) > 1 and elements[0] == 'deb':
                tmp_repo['baseurl'] = elements[1]
                tmp_repo['distribution'] = elements[2]
                components = elements[3:]
                if len(components):
                    tmp_repo['components'] = components

                repo[name].append(tmp_repo)

    return repo
dataset/ETHPy150Open comodit/synapse-agent/synapse/resources/repos-plugin/apt-repos.py/_load_repo/original