import hashlib


def HashName(name):
  """Returns the hash id for a name.

  Args:
    name: The name to hash.

  Returns:
    An int that is at most 32 bits.
  """
  md5hash = hashlib.md5()
  md5hash.update(name.encode('utf-8'))
  return int(md5hash.hexdigest()[:8], 16)