def _get_joint_depth(nodes, joint):
    """ How deep in the tree are we?
    
    :param nodes: Dictionary with skeleton hierarchy.
    :type nodes: dict
    :param joint: Name of the joint in question.
    :type joint: str
    :return: The depth of the joint in the hierarchy.
    :rtype: int
    """
    depth = 0
    parent = nodes[joint]['parent']
    while parent:
        depth += 1
        parent = nodes[parent]['parent']
    return depth
