Created mapping_function argument to fromdict to better handle matlab scructures.