def set_fields(self, fields=None, *fields_args, **fields_kwargs):
if fields_args:<EOL><INDENT>fields = [fields]<EOL>fields.extend(fields_args)<EOL>for field_name in fields:<EOL><INDENT>self.set_field(field_name)<EOL><DEDENT><DEDENT>elif fields_kwargs:<EOL><INDENT>fields = make_dict(fields, fields_kwargs)<EOL>for field_name, field_val in fields.items():<EOL><INDENT>self.set_field(field_name, field_val)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if isinstance(fields, Mapping):<EOL><INDENT>for field_name, field_val in fields.items():<EOL><INDENT>self.set_field(field_name, field_val)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for field_name in fields:<EOL><INDENT>self.set_field(field_name)<EOL><DEDENT><DEDENT><DEDENT>return self<EOL>
completely replaces the current .fields with fields and fields_kwargs combined