def merge_source_requirements(sources):
    projects = set()
    merged_requirements = []
    for infile_path in (locate_file(p, must_exist=True) for p in sources):
        for req in load_requirements(infile_path):
            # Requirements starting with project name "project ..."
            if req.req:
                # Skip already added project name
                if req.req.project_name in projects:
                    continue
                projects.add(req.req.project_name)
                merged_requirements.append(req)

            # Requirements lines like "vcs+proto://url"
            elif req.link:
                merged_requirements.append(req)
            else:
                raise RuntimeError('Unexpected requirement {0}'.format(req))

    return merged_requirements
Read requirements source files and merge it's content.
dataset/ETHPy150Open StackStorm/st2/scripts/fixate-requirements.py/merge_source_requirements