Python code to search for suitable hash functions