code: def partition_targets(
      targets: Iterable[str],
  ) -> Tuple[List[str], List[str]]:
      """
      Given a list of string targets, partition them into included and excluded
      lists depending on whether they start with a - (exclude) or not (include).
      """
      included_targets, excluded_targets = set(), set()
      for target in targets:
          if target[0] == "-":
              assert (
                  not target[1] == "-"
              ), f"Double negation is not allowed: {target}"
              excluded_targets.add(target[1:])
          else:
              included_targets.add(target)
      return included_targets, excluded_targets
  
imports: from collections import defaultdict
  from dataclasses import dataclass
  from typing import Iterable, List, Optional, Set, Tuple
  import argparse
  import os
  import re
  import shlex
  import subprocess
  import sys
  import xml.etree.ElementTree
label_desc: Use image node_id 2 for calling a global function with example usage: partition_targets(targets) and returns: included_targets,  excluded_targets