code: def dirty_vals(model):
          
  
          vals = []
  
          for field in model.dirty_fields:
              vals.append('%({0})s'.format(field))
  
          vals = ', '.join(vals)
  
          return vals or None
docs: Get the models dirty values in a friendly SQL format
  
          This will be a string of comma separated field
          names in a format for psycopg to substitute with
          parameterized inputs.
  
          An example, if the `rid` & `created` fields are
          dirty then they'll be converted into:
  
              '%(rid)s, %(created)s'
  
          :return: str or None