def InetAtoN(addr_string):
  if not addr_string:
    raise socket.error("Empty address string")

  if BAD_SINGLE_COLON.match(addr_string):
    raise socket.error("Start or ends with single colon")

  if addr_string == "::":
    return ("0" * 32).decode("hex_codec")

  addr_string = _RemoveV4Ending(addr_string)
  addr_string = _StripLeadingOrTrailingDoubleColons(addr_string)
  addr_string = _ZeroPad(addr_string)

  try:
    return addr_string.decode("hex_codec")
  except TypeError:
    raise socket.error("Error decoding: %s" % addr_string)
testlist : test
dataset/ETHPy150Open google/grr/grr/lib/ipv6_utils.py/InetAtoN--crossover with--dataset/ETHPy150Open nucleic/enaml/enaml/core/parser.py/p_testlist1