parameters: ()
return_statement: return family
docstring: This function is designed to work in the context of
      getaddrinfo, where family=socket.AF_UNSPEC is the default and
      will perform a DNS search for both IPv6 and IPv4 records.
docstring_summary: This function is designed to work in the context of
      getaddrinfo, where family=socket.AF_UNSPEC is the default and
      will perform a DNS search for both IPv6 and IPv4 records.
docstring_tokens: This function is designed to work in the context of getaddrinfo where family = socket . AF_UNSPEC is the default and will perform a DNS search for both IPv6 and IPv4 records .
function: def allowed_gai_family():
      """This function is designed to work in the context of
      getaddrinfo, where family=socket.AF_UNSPEC is the default and
      will perform a DNS search for both IPv6 and IPv4 records."""
  
      family = socket.AF_INET
      if HAS_IPV6:
          family = socket.AF_UNSPEC
      return family
function_tokens: def allowed_gai_family ( ) : family = socket . AF_INET if HAS_IPV6 : family = socket . AF_UNSPEC return family