def lowercase(data):
    """Lowercase text

    Args:
        data (list,str): Data to lowercase (either a string or a list
            [of lists..] of strings)

    Returns:
        list, str: Lowercased data
    """

    if isinstance(data, (list, tuple)):
        return [lowercase(item) for item in data]
    elif isinstance(data, dict):
        return {k: lowercase(v) for k, v in data.items()}
    elif isinstance(data, str):
        return data.lower()
    else:
        raise ValueError("Can only lowercase strings or lists of strings")