def _get_boolean(value):
    """
    Return a boolean for a given string value.

    :param value:  The value to interpret as a boolean

    :return:  either True or False
    """
    true_bools = ['yes', 'y', 'true', 't']

    if isinstance(value, bool):
        return value
    elif isinstance(value, (str)):
        if value.lower() in true_bools:
            return True

    return False