code: def _dump_model(model, attrs=None):
      
  
      fields = []
  
      for field in model._meta.fields:
          fields.append((field.name, str(getattr(model, field.name))))
  
      if attrs is not None:
          for attr in attrs:
              fields.append((attr, str(getattr(model, attr))))
  
      for field in model._meta.many_to_many:
          vals = getattr(model, field.name)
          fields.append((field.name, '{val} ({count})'.format(
              val=', '.join(map(str, vals.all())),
              count=vals.count(),
          )))
  
      print(', '.join(
          '{0}={1}'.format(field, value)
          for field, value in fields
      ))
docs: Dump the model fields for debugging.