def copy(node):
    """
    Copies the node.

    >>> o = BinOp(Add(), NumberConstant(2), NumberConstant(3))
    >>> o2 = copy(o)
    >>> o.__dict__['op'] = Sub()
    >>> print(o, o2)
    (2 - 3) (2 + 3)
    """
    return node.__class__(**dict(node))
