def METHOD_NAME(expr, atom=lambda x: not isinstance(x, Basic), pos=(), repeat=True):
    """List of strings for all expr->expr.arg pairs.
    >>> for e in dotedges(x+2):
    ...     print(e)
    "Add(Symbol('x'), Integer(2))_()" -> "Integer(2)_(0,)";
    "Add(Symbol('x'), Integer(2))_()" -> "Symbol('x')_(1,)";
    See Also
    ========
    dotprint
    """
    if atom(expr):
        return []
    expr_str = repr(expr)
    arg_strs = [repr(arg) for arg in expr.args]
    if repeat:
        expr_str += f'_{pos!s}'
        arg_strs = [arg_str + f'_{pos + (i,)!s}' for i, arg_str in enumerate(arg_strs)]
    return [f'"{expr_str}" -> "{arg_str}";' for arg_str in arg_strs]