@logExceptions(_LOGGER)<EOL><INDENT>def modelsGetFields(self, modelIDs, fields):<DEDENT>
assert len(fields) >= <NUM_LIT:1>, '<STR_LIT>'<EOL>isSequence = isinstance(modelIDs, self._SEQUENCE_TYPES)<EOL>if isSequence:<EOL><INDENT>assert len(modelIDs) >=<NUM_LIT:1>, '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>modelIDs = [modelIDs]<EOL><DEDENT>rows = self._getMatchingRowsWithRetries(<EOL>self._models, dict(model_id=modelIDs),<EOL>['<STR_LIT>'] + [self._models.pubToDBNameDict[f] for f in fields])<EOL>if len(rows) < len(modelIDs):<EOL><INDENT>raise RuntimeError("<STR_LIT>" % (<EOL>(set(modelIDs) - set(r[<NUM_LIT:0>] for r in rows)),))<EOL><DEDENT>if not isSequence:<EOL><INDENT>return list(rows[<NUM_LIT:0>][<NUM_LIT:1>:])<EOL><DEDENT>return [(r[<NUM_LIT:0>], list(r[<NUM_LIT:1>:])) for r in rows]<EOL>
Fetch the values of 1 or more fields from a sequence of model records.
        Here, 'fields' is a list with the names of the fields to fetch. The names
        are the public names of the fields (camelBack, not the lower_case_only form
        as stored in the DB).

        WARNING!!!: The order of the results are NOT necessarily in the same order
        as the order of the model IDs passed in!!!


        Parameters:
        ----------------------------------------------------------------
        modelIDs:      A single modelID or sequence of modelIDs
        fields:        A list  of fields to return

        Returns:  If modelIDs is a sequence:
                    a list of tuples->(modelID, [field1, field2,...])
                  If modelIDs is a single modelID:
                    a list of field values->[field1, field2,...]