Refactor `generic_lines`

The following discussion from !1428 (merged) should be addressed:

  • @sstahl started a discussion: (+1 comment)

    Maybe we could move the line to the generic_lines folder and include it in the tests of these. But not sure.

Edited by Marian Stahl