def string_to_bool(string):
    """Converts a string to boolean if string is either 'True' or 'False'
    otherwise returns it unchanged.
    """
    if string == 'True':
        return True
    elif string == 'False':
        return False
    return string