call the method extend with refs as argument, on the result call the pending_references.setdefault method with refto and empty list as arguments.
pending_references . setdefault ( refto , [ ] ) . extend ( refs )