'Get the existing KB or create a new one if none exists.'

def InitializeKnowledgeBase(self):

    self.client = aff4.FACTORY.Open(self.client_id, token=self.token)
    self.state.knowledge_base = GetArtifactKnowledgeBase(self.client, allow_uninitialized=True)
    if (not self.state.knowledge_base.os):
        raise flow.FlowError(('Client    OS    not    set    for:    %s,    cannot    initialize    KnowledgeBase' % self.client_id))
