class_docstr: A set of excellent Records from a query.
class_docstr_tok: ["A","set","of","excellent","Records","from","a","query","."]
docstr: Returns a single record for the RecordCollection, ensuring that it
  is the only record, or returns `default`. If `default` is an instance
  or subclass of Exception, then raise it instead of returning it.
docstr_tok: ["Returns","a","single","record","for","the","RecordCollection",",","ensuring","that","it","is","the","only","record",",","or","returns","`","default","`",".","If","`","default","`","is","an","instance","or","subclass","of","Exception",",","then","raise","it","instead","of","returning","it","."]
code: def one(self, default=None, as_dict=False, as_ordereddict=False):
      """Returns a single record for the RecordCollection, ensuring that it
      is the only record, or returns `default`. If `default` is an instance
      or subclass of Exception, then raise it instead of returning it.
      """
  
      # Ensure that we don't have more than one row.
      try:
          self[1]
      except IndexError:
          return self.first(
              default=default,
              as_dict=as_dict,
              as_ordereddict=as_ordereddict,
          )
      else:
          raise ValueError(
              "RecordCollection contained more than one row. "
              "Expects only one row when using "
              "RecordCollection.one"
          )
  
imports: import os
  from sys import stdout
  from collections import OrderedDict
  from contextlib import contextmanager
  from inspect import isclass
  import tablib
  from docopt import docopt
  from sqlalchemy import create_engine, exc, inspect, text
label_desc: Use image node_id 13 for calling the RecordCollection obj's underlying member method code with example usage: obj.one(default, as_dict, as_ordereddict) and returns: self