Self-optimizing Python Automatic Generator of Hierarchically blockEd Tensor Transpose librarY