An implementation of Hierarchical Temporal Memory in python