def get(self, key=None, **kwargs):
clone = copy.deepcopy(self)<EOL>if self._start:<EOL><INDENT>clone.adapter.set_params(start=self._start)<EOL><DEDENT>if self._rows:<EOL><INDENT>clone.adapter.set_params(rows=self._rows)<EOL><DEDENT>if key:<EOL><INDENT>data, key = clone.adapter.get(key)<EOL><DEDENT>elif kwargs:<EOL><INDENT>data, key = clone.filter(**kwargs).adapter.get()<EOL><DEDENT>else:<EOL><INDENT>data, key = clone.adapter.get()<EOL><DEDENT>if clone._cfg['<STR_LIT>'] == ReturnType.Object:<EOL><INDENT>return data, key<EOL><DEDENT>return self._make_model(data, key)<EOL>
Ensures that only one result is returned from DB and raises an exception otherwise.
Can work in 3 different way.

    - If no argument is given, only does "ensuring about one and only object" job.
    - If key given as only argument, retrieves the object from DB.
    - if query filters given, implicitly calls filter() method.

Raises:
    MultipleObjectsReturned: If there is more than one (1) record is returned.