+ """
+ mdup(LIST) -> LIST:
+ LIST is a list (mutable sequence) of pairs (CUR, WANT). Duplicate each
+ CUR file descriptor as WANT (may be -1 to mean `don't care'), closing
+ original CUR. Works even if there are cycles. LIST is updated in place
+ with CUR reflecting the new file descriptors even on error. Returns the
+ same LIST on success.
+ """