code: def get_family(addr: str) -> int:
      """Get network family from address."""
      return socket.getaddrinfo(addr, None)[0][0]
  
imports: import socket
  import struct
  import logging
  from threading import Thread
  import argparse
  import sys
  from typing import Dict, List, Tuple, Union, Optional, Set
label_desc: Use image node_id 2 for calling a global function with example usage: get_family(addr) and returns: socket