def close_path_traces(*args):
pts = [x for x in args if is_path_trace(x)]<EOL>if len(pts) == <NUM_LIT:0>:<EOL><INDENT>if len(args) == <NUM_LIT:1> and hasattr(args[<NUM_LIT:0>], '<STR_LIT>'): return close_path_traces(*args[<NUM_LIT:0>])<EOL>raise ValueError('<STR_LIT>')<EOL><DEDENT>mp0 = pts[<NUM_LIT:0>].map_projection<EOL>if not all(mp is None or mp.normalize() == mp0.normalize()<EOL>for x in pts[<NUM_LIT:1>:] for mp in [x.map_projection]):<EOL><INDENT>warnings.warn('<STR_LIT>')<EOL><DEDENT>crvs = [x.curve if is_path_trace(x) else to_curve_spline(x) for x in args]<EOL>loop = close_curves(*crvs)<EOL>return path_trace(mp0, loop.coordinates, closed=True)<EOL>
close_path_traces(pt1, pt2...) yields the path-trace formed by joining the list of path traces
  at their intersection points in the order given. Note that the direction in which each
  individual path trace's coordinates are specified is ultimately ignored by this function--the
  only ordering that matters is the order in which the list of paths is given.

Each path argument may alternately be a curve-spline object or coordinate matrix, so long as all
paths and curves track the same 2D space.