Can you put this line into a local `def` to DRY up the code?