<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def namedb_delete_prepare( cur, primary_key, primary_key_value, table_name ):
 """ Prepare to delete a record, but make sure the fields in record correspond to actual columns. Raise an Exception if not. DO NOT CALL THIS METHOD DIRETLY """

    # primary key corresponds to a real column 
    namedb_assert_fields_match( cur, {primary_key: primary_key_value}, table_name, columns_match_record=False )

    query = "DELETE FROM %s WHERE %s = ?;" % (table_name, primary_key)
    values = (primary_key_value,)
    return (query, values)