def return_slide_layout_by_name(pptx, slide_layout_name):
    """
    Loop over the slide layout object and find slide layout by name, return slide layout
    object.

    example: myslide = get_slide_layout_by_name(prs, 'Inhaltsverzeichnis')
             slide = prs.slides.add_slide(myslide)
    """

    for slide_layout in pptx.slide_layouts:
        if slide_layout.name == slide_layout_name:
            return slide_layout
    else:
        raise Exception(
            'Slide layout: {sld_layout} not found\n'.format(
                sld_layout=slide_layout_name))