'Assuming the given value has smaller length than keys, return
nodes whose keys have this value as a prefix.'

def same_prefix(self, val):

    if (self.root is None):
        return []
    nodes = self._same_prefix(val, self.root, [])
    return [x for node in nodes for x in node.data]
