···33import logging
445566-# Return two halves of the given list. For odd-length lists, the second half
77-# will be larger.
88-def split_list(items):
99- half = len(items) // 2
1010- return items[0:half], items[half:]
1111-1212-136# Attempt to reduce the `items` argument as much as possible, returning the
147# shorter version. `fixed` will always be used as part of the items when
158# running `command`.
···2114 while len(items) > 1:
2215 logging.info(f"{indent}{len(fixed) + len(items)} candidates")
23162424- left, right = split_list(items)
1717+ # Return two halves of the given list. For odd-length lists, the second
1818+ # half will be larger.
1919+ half = len(items) // 2
2020+ left = items[0:half]
2121+ right = items[half:]
2522 if not command(fixed + left):
2623 items = left
2724 continue