def strip_rule(line):
    """
    Sanitize a rule string provided before writing it to the output hosts file.

    Some sources put comments around their rules, for accuracy we need
    to strip them the comments are preserved in the output hosts file.

    Parameters
    ----------
    line : str
        The rule provided for sanitation.

    Returns
    -------
    sanitized_line : str
        The sanitized rule.
    """

    split_line = line.split()
    if len(split_line) < 2:
        # just return blank
        return ""
    else:
        return split_line[0] + " " + split_line[1]