def map_bool(to_bool) -> bool:
    """Maps value to boolean from a string.

    Parameters
    ----------
    to_bool: str
        Value to be converted to boolean.

    Returns
    -------
    mapped_bool: bool
        Boolean value converted from string.

    Example
    -------
    >>> boolean_string = "True" # can also be lower case

    >>> boolean_value = map_bool(boolean_string)
    """
    try:
        boolean_map = {"true": True, "false": False}
        mapped_bool = boolean_map[to_bool.lower()]
    except KeyError:
        raise KeyError("Boolean Value Expected got '{}'".format(to_bool))

    return mapped_bool