Change has_key to in because of the recommendation of pep8