def guilds(self):
    return Guild.query().filter(Guild.members == self.key)


class Guild(ndb.Model):
    members = ndb.KeyProperty(kind='Person', repeated=True)

def add_person(self, person):
    self.members.append(person.key)
self.put()
Many-To-Many Relationship in ndb