import socket


def convert_ip_with_dots_to_bytes(ip_with_dots):
    """
    Converts an IP address in string form with dots to bytes
    e.g. '192.168.0.1' -> b'\xc0\xa8\x00\x01'
    """
    return socket.inet_aton(ip_with_dots)