@classmethod
def get_next(cls, prefix=None):
    """Return the next available ID in a repository."""
    id_ = cls.get_latest(prefix)
    if id_:
        return id_.incr()
    elif prefix:
        return cls(id_text=cls.FORMAT_IDX % (prefix, cls.SID_0))
    else:
        return cls(id_text=cls.SID_0)
