def _dump_model(model, attrs=None):
fields = []<EOL>for field in model._meta.fields:<EOL><INDENT>fields.append((field.name, str(getattr(model, field.name))))<EOL><DEDENT>if attrs is not None:<EOL><INDENT>for attr in attrs:<EOL><INDENT>fields.append((attr, str(getattr(model, attr))))<EOL><DEDENT><DEDENT>for field in model._meta.many_to_many:<EOL><INDENT>vals = getattr(model, field.name)<EOL>fields.append((field.name, '<STR_LIT>'.format(<EOL>val='<STR_LIT:U+002CU+0020>'.join(map(str, vals.all())),<EOL>count=vals.count(),<EOL>)))<EOL><DEDENT>print('<STR_LIT:U+002CU+0020>'.join(<EOL>'<STR_LIT>'.format(field, value)<EOL>for field, value in fields<EOL>))<EOL>
Dump the model fields for debugging.