def bool_replace(text):
    """In text replace str values 'true' and 'false' by boolean values

    Args:
        text (str): Incoming text.

    Returns:
        str: Formatted text.
    """
    if text == "false":
        return False
    elif text == "true":
        return True
    else:
        return text