import textwrap


def codeblock(block_str):
    """
    Convinience function for defining code strings. Esspecially useful for
    templated code.
    """
    return textwrap.dedent(block_str).strip('\n')