@classmethod
def one(cls, *args):
    """Fetch an instance of the model by its key.

        Returns:
            An instance of the model.
        """
    col = cls._key()
    if len(col) != len(args):
        raise ValueError('Invalid key')
    query = cls._session().query(cls)
    if getattr(cls, '__key__', None) is None and len(col) == 1:
        return query.get(*args)
    query = query.filter_by(**dict(zip(col, args)))
    if query.count() > 1:
        msg = 'The keys does not ensure the uniqueness of an instance.'
        raise NotImplementedError(msg)
    return query.first()
