'Check that `prepopulated_fields` is a dictionary containing allowed
field types.'

def _check_prepopulated_fields(self, obj):

    if (not isinstance(obj.prepopulated_fields, dict)):
        return must_be('a    dictionary', option='prepopulated_fields', obj=obj, id='admin.E026')
    else:
        return list(chain.from_iterable(((self._check_prepopulated_fields_key(obj, obj.model, field_name, 'prepopulated_fields') + self._check_prepopulated_fields_value(obj, obj.model, val, ('prepopulated_fields["%s"]' % field_name))) for (field_name, val) in obj.prepopulated_fields.items())))
