Implement shrink_to
method on collections
#49400
Merged
shrink_to
method on collections
#49400