<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_specs(cls, target_specs, build_root=None, exclude_patterns=None, tags=None):
 """Parse string specs into unique `Spec` objects. :param iterable target_specs: An iterable of string specs. :param string build_root: The path to the build root. :returns: A `Specs` object. """

    build_root = build_root or get_buildroot()
    spec_parser = CmdLineSpecParser(build_root)

    dependencies = tuple(OrderedSet(spec_parser.parse_spec(spec_str) for spec_str in target_specs))
    return Specs(
      dependencies=dependencies,
      exclude_patterns=exclude_patterns if exclude_patterns else tuple(),
      tags=tags)