def send_magic_packet(*macs, **kwargs):
packets = []<EOL>ip = kwargs.pop('<STR_LIT>', BROADCAST_IP)<EOL>port = kwargs.pop('<STR_LIT:port>', DEFAULT_PORT)<EOL>for k in kwargs:<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>'.format(k))<EOL><DEDENT>for mac in macs:<EOL><INDENT>packet = create_magic_packet(mac)<EOL>packets.append(packet)<EOL><DEDENT>sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)<EOL>sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, <NUM_LIT:1>)<EOL>sock.connect((ip, port))<EOL>for packet in packets:<EOL><INDENT>sock.send(packet)<EOL><DEDENT>sock.close()<EOL>
Wake up computers having any of the given mac addresses.

Wake on lan must be enabled on the host device.

Args:
    macs (str): One or more macaddresses of machines to wake.

Keyword Args:
    ip_address (str): the ip address of the host to send the magic packet
                 to (default "255.255.255.255")
    port (int): the port of the host to send the magic packet to
           (default 9)