'Get a flat list of relatives, either upstream or downstream.'

def get_flat_relatives(self, upstream=False, l=None):

    if (not l):
        l = []
    for t in self.get_direct_relatives(upstream):
        if (not is_in(t, l)):
            l.append(t)
            t.get_flat_relatives(upstream, l)
    return l
