def get_forward_type(node):
    pnode = node.last
    if pnode:
        return pnode.type
    return None
def get_forward_type(node):
    pnode = node.last
    if pnode:
        return pnode.type
    return None