(expr, styles=default_styles, labelfunc=str, pos=(), repeat=True)
return '"%s" [%s];' % (expr_str, attrprint(style))
String defining a node

    >>> from sympy.printing.dot import dotnode
    >>> from sympy.abc import x
    >>> print(dotnode(x))
    "Symbol(x)_()" ["color"="black", "label"="x", "shape"="ellipse"];
String defining a node
String defining a node
def dotnode(expr, styles=default_styles, labelfunc=str, pos=(), repeat=True):
    """ String defining a node

    >>> from sympy.printing.dot import dotnode
    >>> from sympy.abc import x
    >>> print(dotnode(x))
    "Symbol(x)_()" ["color"="black", "label"="x", "shape"="ellipse"];
    """
    style = styleof(expr, styles)

    if isinstance(expr, Basic) and not expr.is_Atom:
        label = str(expr.__class__.__name__)
    else:
        label = labelfunc(expr)
    style['label'] = label
    expr_str = purestr(expr)
    if repeat:
        expr_str += '_%s' % str(pos)
    return '"%s" [%s];' % (expr_str, attrprint(style))
def dotnode ( expr , styles = default_styles , labelfunc = str , pos = ( ) , repeat = True ) : style = styleof ( expr , styles ) if isinstance ( expr , Basic ) and not expr . is_Atom : label = str ( expr . __class__ . __name__ ) else : label = labelfunc ( expr ) style [ 'label' ] = label expr_str = purestr ( expr ) if repeat : expr_str += '_%s' % str ( pos ) return '"%s" [%s];' % ( expr_str , attrprint ( style ) )