def METHOD_NAME(hostname, port, family=socket.AF_INET6):
    sock = socket.socket(family, socket.SOCK_DGRAM)
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    sock.bind((hostname, port))
    logger.info(f'socket for udp_server {sock}')
    return sock