def add(self, repo):
        key = self.key(repo.username, repo.reponame)
        repo.key = key
        self.repos[key] = repo
        return key
Generate validate function to make sure the record is legal.
dataset/ETHPy150Open pingali/dgit/dgitcore/plugins/repomanager.py/RepoManagerBase.add--crossover with--dataset/ETHPy150Open openstack/compass-core/compass/db/models.py/HelperMixin.validate