def _populate(self, json):
Base._populate(self, json)<EOL>mapped_udfs = []<EOL>for udf in self.user_defined_fields:<EOL><INDENT>t = UserDefinedFieldType.text<EOL>choices = None<EOL>if hasattr(udf, '<STR_LIT>'):<EOL><INDENT>t = UserDefinedFieldType.select_one<EOL>choices = udf.oneof.split('<STR_LIT:U+002C>')<EOL><DEDENT>elif hasattr(udf, '<STR_LIT>'):<EOL><INDENT>t = UserDefinedFieldType.select_many<EOL>choices = udf.manyof.split('<STR_LIT:U+002C>')<EOL><DEDENT>mapped_udfs.append(UserDefinedField(udf.name,<EOL>udf.label if hasattr(udf, '<STR_LIT:label>') else None,<EOL>udf.example if hasattr(udf, '<STR_LIT>') else None,<EOL>t, choices=choices))<EOL><DEDENT>self._set('<STR_LIT>', mapped_udfs)<EOL>ndist = [ Image(self._client, d) for d in self.images ]<EOL>self._set('<STR_LIT>', ndist)<EOL>
Override the populate method to map user_defined_fields to
fancy values