This question is best asked on the Biopython mailing list or perhaps the http://www.biostars.org/ . It's much more likely there to find people with Entrez experience.
The problem is that the record with PMID 23165874 doesn't have any MeSH terms. Compare the raw XML of that record to one which has MeSH terms. The latter has a section starting:
<MeshHeadingList>
<MeshHeading>
<DescriptorName MajorTopicYN="N">ADP Ribose Transferases</DescriptorName>
<QualifierName MajorTopicYN="Y">genetics</QualifierName>
</MeshHeading>
<MeshHeading>
<DescriptorName MajorTopicYN="N">Acinetobacter</DescriptorName>
<QualifierName MajorTopicYN="Y">drug effects</QualifierName>
<QualifierName MajorTopicYN="Y">genetics</QualifierName>
</MeshHeading>
..
In other words, it's hard to get something which doesn't exist.