def getEndJoints(jnt):
    """
    Recurse through children and return all joints that have no joint children.

    Args:
        jnt (PyNode): A joint node
    """
    result = []
    children = jnt.listRelatives(children=True, typ='joint')
    if not children:
        result.append(jnt)
    else:
        for child in children:
            result.extend(getEndJoints(child))
    return result