def shrink_pool(arg, opts, shell_opts):
if not pool:<EOL><INDENT>print("<STR_LIT>" % arg, file=sys.stderr)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if '<STR_LIT>' in opts:<EOL><INDENT>res = Prefix.list({'<STR_LIT>': opts['<STR_LIT>'], '<STR_LIT>': pool.id})<EOL>if len(res) == <NUM_LIT:0>:<EOL><INDENT>print("<STR_LIT>" % (pool.name,<EOL>opts['<STR_LIT>']), file=sys.stderr)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>res[<NUM_LIT:0>].pool = None<EOL>res[<NUM_LIT:0>].save()<EOL>print("<STR_LIT>" % (res[<NUM_LIT:0>].prefix, pool.name))<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>" % (<EOL>pool.name), file=sys.stderr)<EOL>for pref in Prefix.list({'<STR_LIT>': pool.id}):<EOL><INDENT>print("<STR_LIT>" % pref.prefix)<EOL><DEDENT><DEDENT>
Shrink a pool by removing the ranges in opts from it