def get_random_values(fields):
values = {}<EOL>for field in fields:<EOL><INDENT>try:<EOL><INDENT>value = get_random_value(field)<EOL><DEDENT>except AttributeError:<EOL><INDENT>value = None<EOL><DEDENT>values.update({field: value})<EOL><DEDENT>return values<EOL>
Pass in a list of fields (as strings) to get a dict with the
field name as a key and a randomly generated value as another