def log_ip_flow(from_ip, to_ip, prediction, proba):
    """
        Log the ip flow information

        Args:
            out_info - a Zip object containing:
                from_ip    - pandas series
                to_ip list - pandas series
                prediction - np array of prediction
                proba      - np array of pred probabilities

        Returns:
            Return the output buffer for writing to files
    """
    src = f'Src IP: {from_ip}'
    dst = f'Dst IP: {to_ip}'
    pred = f"Prediction: {'Malicious' if prediction else 'Safe'}"
    prob = f'Probabilities:'
    safe = f' - Safe - {proba[0] * 100:.2f}%'
    mal = f' - Malicious - {proba[1] * 100:.2f}%'
    print('---IP---')
    print(src)
    print(dst)
    print(pred)
    print(prob)
    print(safe)
    print(mal)
    print('--------')
    return '---IP BLOCK---', src, dst, pred, prob, safe, mal, '--------'
