code: def normalize_and_reduce_paths(paths):
      """Return a list of normalized paths with duplicates removed.
  
      The current order of paths is maintained.
      """
      # Paths are normalized so things like:  /a and /a/ aren't both preserved.
      reduced_paths = []
      for p in paths:
          np = os.path.normpath(p)
          # XXX(nnorwitz): O(n**2), if reduced_paths gets long perhaps use a set.
          if np not in reduced_paths:
              reduced_paths.append(np)
      return reduced_paths
  
imports: import os
  import subprocess
  import sys
  import re
  import warnings
  from .errors import DistutilsExecError, DistutilsPlatformError, CompileError, LibError, LinkError
  from .ccompiler import CCompiler, gen_lib_options
  from ._log import log
  from .util import get_platform
  import winreg
label_desc: Use image node_id 2 for calling a global function with example usage: normalize_and_reduce_paths(paths) and returns: reduced_paths