def _sanitize_for_filename(text):
    """
    Sanitize the given text for use in a filename.

    (particularly log and lock files under Unix. So we lowercase them.)

    :type text: str
    :rtype: str
    >>> _sanitize_for_filename('some one')
    'some-one'
    >>> _sanitize_for_filename('s@me One')
    's-me-one'
    >>> _sanitize_for_filename('LS8 BPF')
    'ls8-bpf'
    """
    return "".join([x if x.isalnum() else "-" for x in text.lower()])