original_docstring: Get a sort key for an IPv4 or IPv6 address
docstring: Get a sort key for an IPv4 or IPv6 address
docstring_tokens: Get a sort key for an IPv4 or IPv6 address
code: def ip_sort_key(ip_address):
      """Get a sort key for an IPv4 or IPv6 address"""
      if ':' in ip_address:
          # IPv6
          return b'6' + socket.inet_pton(socket.AF_INET6, ip_address)
      # IPv4
      return b'4' + socket.inet_aton(ip_address)
code_tokens: def ip_sort_key ( ip_address ) : if ':' in ip_address : return b'6' + socket . inet_pton ( socket . AF_INET6 , ip_address ) return b'4' + socket . inet_aton ( ip_address )
short_docstring: Get a sort key for an IPv4 or IPv6 address
short_docstring_tokens: Get a sort key for an IPv4 or IPv6 address
comment: """Get a sort key for an IPv4 or IPv6 address"""$SEP$# IPv6$SEP$# IPv4