title: Convert mongoengine BaseDict to Dict in Python
body: <p>Maybe this is a lame question, but is there an elegant way to convert a <code>BaseDict</code> (mongoengine.base.datastructures) object to <code>dict</code> with all its fields or should I write a recursive function to process all levels? The <code>BaseDict</code> object might contain fields with type of <code>BaseDict</code>, <code>BaseList</code> and other primitive types (int, float, etc).</p>
  <p>If I write <code>new_object = dict(basedict_object)</code>, only the the type of the object changes, but the fields do not.</p>