def first(self, default=None, as_dict=False, as_ordereddict=False):
<EOL>try:<EOL><INDENT>record = self[<NUM_LIT:0>]<EOL><DEDENT>except IndexError:<EOL><INDENT>if isexception(default):<EOL><INDENT>raise default<EOL><DEDENT>return default<EOL><DEDENT>if as_dict:<EOL><INDENT>return record.as_dict()<EOL><DEDENT>elif as_ordereddict:<EOL><INDENT>return record.as_dict(ordered=True)<EOL><DEDENT>else:<EOL><INDENT>return record<EOL><DEDENT>
Returns a single record for the RecordCollection, or `default`. If
        `default` is an instance or subclass of Exception, then raise it
        instead of returning it.