def _cooked_fields(self, dj_fields):
from django.db import models<EOL>valids = []<EOL>for field in dj_fields:<EOL><INDENT>try:<EOL><INDENT>dj_field, _, _, _ = self.model._meta.get_field_by_name(field)<EOL>if isinstance(dj_field, models.ForeignKey):<EOL><INDENT>valids.append((field + "<STR_LIT>", field, dj_field))<EOL><DEDENT>else:<EOL><INDENT>valids.append((field, field, dj_field))<EOL><DEDENT><DEDENT>except models.FieldDoesNotExist:<EOL><INDENT>valids.append((field, field, None))<EOL><DEDENT><DEDENT>return valids<EOL>
Returns a tuple of cooked fields
:param dj_fields: a list of django name fields
:return: