def set_dir(self, value):
    params = self.ARROW_DEF.get(value.lower())
    if (params is None):
        warning('unknown edge dir: %s', value)
    else:
        (self.dir, self.style, self.asynchronous) = params
        if ((self.node1 == self.node2) and (self.dir in ('forward', 'back'))):
            self.activate = False
def set_dir(self, value):
    params = self.ARROW_DEF.get(value.lower())
    if (params is None):
        warning('unknown edge dir: %s', value)
    else:
        (self.dir, self.style, self.asynchronous) = params
        if ((self.node1 == self.node2) and (self.dir in ('forward', 'back'))):
            self.activate = False