def _bool(xml_boolean):
    """Converts strings "true" and "false" from XML files to Python bool"""

    assert xml_boolean in ["true", "false"], \
        "The boolean string must be \"true\" or \"false\""
    return {"true": True, "false": False}[xml_boolean]