def loads(self, requirements_text):
        lines = re.findall(Requirement.spec_regex,
                           requirements_text,
                           re.MULTILINE)
        for line in lines:
            self.add(Requirement(line[0], "".join(line[1:])))
def union(matches, root, cwd):
    """Union a list of matchers.

    If the list is empty, return nevermatcher.
    If the list only contains one non-None value, return that matcher.
    Otherwise return a union matcher.
    """
    matches = list(filter(None, matches))
    if len(matches) == 0:
        return nevermatcher(root, cwd)
    elif len(matches) == 1:
        return matches[0]
    else:
        return unionmatcher(matches)