I'd think you'd want to change `index_by_repoids` to have `def index_by_repoids(repoids = [])` so that you can avoid having to pass an empty array explicitly.