get_layout function

Layout selection helper