implement missing `hash_func` method as noted by @mattrobenolt