'Add a new subject to the database.'

def _AddNewSubject(self, client, subjects, i, value, max_attributes=3):

    number_predicates = self.rand.randrange(1, max_attributes)
    self.subjects += 1
    predicates = dict.fromkeys(xrange(number_predicates))
    self.predicates += number_predicates
    subject = str(client.Add(self._GenerateRandomSubject()))
    for j in xrange(number_predicates):
        number_timestamps = self.rand.randrange(1, 3)
        self.values += number_timestamps
        ts = [(100 * (ts + 1)) for ts in xrange(number_timestamps)]
        predicates[j] = ts
        values = [(value, t) for t in ts]
        data_store.DB.MultiSet(subject, {(self.predicate_template % j): values}, timestamp=100, replace=False, sync=False, token=self.token)
        self.Register()
    info = {'name': subject, 'attrs': predicates}
    subjects[i] = info
