You can change these three lines to:

`@invalid_ean13_barcodes.concat(label.deep_fetch_all("ean13").reject(method(:validate_ean13_barcode)))`

Which would mean that this entire function then would become:

`@invalid_ean13_barcodes = labels.map { |label| label.deep_fetch_all("ean13") }.flatten.reject(method(:validate_ean13_barcode))`

And then you should consider whether checking for a valid or invalid EAN13 barcodes is part of this codes responsibility, or that of the label itself: if the latter then you should have a class for labels so that you can do something like:

`@invalid_ean13_barcodes = labels.map(&:invalid_ean13_barcodes).flatten`