def METHOD_NAME(node):
    """Returns whether a particular AST node is an ancestor path expression
    e.g.
    - `parent/host/thing`
    - `parent/host`
    """
    if not isinstance(node, BinaryExpression) or node.op != '/':
        return False
    if isinstance(node.left, BinaryExpression):
        return METHOD_NAME(node.left)
    return isinstance(node.left, Step)