

def receiveMessage(self, msg, sender):
    if (msg == 'Best Friend'):
        if (not self.bestFriend):
            self.bestFriend = self.createActor(Lassie)
        self.send(self.bestFriend, msg)
        return
    if (msg == 'Best Friend Says'):
        if (not self.bestFriend):
            self.send(sender, 'no best friend')
        else:
            self.waiter = sender
            self.send(self.bestFriend, 'what')
    elif (self.bestFriend and (self.bestFriend == sender)):
        if self.waiter:
            if (sender != sender.bestFriend):
                self.send(self.waiter, 'ERROR: lcl/rmt address comparison not epimorphic.')
            else:
                self.send(self.waiter, msg)
            self.waiter = None
        else:
            pass
    elif (sender != self.myAddress):
        self.send(sender, 'Greetings.')

dataset/ETHPy150Open godaddy/Thespian/thespian/test/testMultipleActorSystems.py ActorsLikeDogs.receiveMessage/VarMisuse@139/188 `self`->`sender`