def hash_names(names, hash_function=None):
    """Return the hash of an iterable of strings, or a dict if multiple hash functions given.

    :param iter[str] names: An iterable of strings
    :param hash_function: A hash function or list of hash functions, like :func:`hashlib.md5` or :func:`hashlib.sha512`
    :rtype: str
    """
    hash_function = hash_function or hashlib.md5
    names_bytes = _names_to_bytes(names)
    return hash_function(names_bytes).hexdigest()
Return the hash of an iterable of strings, or a dict if multiple hash functions given.

    :param iter[str] names: An iterable of strings
    :param hash_function: A hash function or list of hash functions, like :func:`hashlib.md5` or :func:`hashlib.sha512`
    :rtype: str