human
Complete this python program:
def export_graphviz(decision_tree, out_file=SENTINEL, max_depth=None, feature_names=None, class_names=None, label='all', filled=False, leaves_parallel=False, impurity=True, node_ids=False, proportion=False, rotate=False, rounded=False, special_characters=False, precision=3):
assistant
#Here is the Python program you requested.

    """Export a decision tree in DOT format.
    This function generates a GraphViz representation of the decision tree,
    which is then written into `out_file`. Once exported, graphical renderings
    can be generated using, for example::
    $ dot -Tps tree.dot -o tree.ps      (PostScript format)
    $ dot -Tpng tree.dot -o tree.png    (PNG format)
    The sample counts that are shown are weighted with any sample_weights that
    might be present.
    Read more in the :ref:`User Guide <tree>`.
    Parameters
    decision_tree : decision tree classifier
    The decision tree to be exported to GraphViz.
    out_file : file object or string, optional (default=\tree.dot\)
    Handle or name of the output file. If ``None``, the result is
    returned as a string. This will the default from version 0.20.
    max_depth : int, optional (default=None)
    The maximum depth of the representation. If None, the tree is fully
    generated.
    feature_names : list of strings, optional (default=None)
    Names of each of the features.
    class_names : list of strings, bool or None, optional (default=None)
    Names of each of the target classes in ascending numerical order.
    Only relevant for classification and not supported for multi-output.
    If ``True``, shows a symbolic representation of the class name.
    label : {\all\, \root\, \none\}, optional (default=\all\)
    Whether to show informative labels for impurity, etc.
    Options include \all\ to show at every node, \root\ to show only at
    the top root node, or \none\ to not show at any node.
    filled : bool, optional (default=False)
    When set to ``True``, paint nodes to indicate majority class for
    classification, extremity of values for regression, or purity of node
    for multi-output.
    leaves_parallel : bool, optional (default=False)
    When set to ``True``, draw all leaf nodes at the bottom of the tree.
    impurity : bool, optional (default=True)
    When set to ``True``, show the impurity at each node.
    node_ids : bool, optional..."""
    def get_color(value):
        if (colors['bounds'] is None):
            color = list(colors['rgb'][np.argmax(value)])
            sorted_values = sorted(value, reverse=True)
            if (len(sorted_values) == 1):
                alpha = 0
            else:
                alpha = int(np.round(((255 * (sorted_values[0] - sorted_values[1])) / (1 - sorted_values[1])), 0))
        else:
            color = list(colors['rgb'][0])
            alpha = int(np.round((255 * ((value - colors['bounds'][0]) / (colors['bounds'][1] - colors['bounds'][0]))), 0))
        color.append(alpha)
        hex_codes = [str(i) for i in range(10)]
        hex_codes.extend(['a', 'b', 'c', 'd', 'e', 'f'])
        color = [(hex_codes[(c // 16)] + hex_codes[(c % 16)]) for c in color]
        return ('#' + ''.join(color))
    def node_to_str(tree, node_id, criterion):
        if (tree.n_outputs == 1):
            value = tree.value[node_id][0, :]
        else:
            value = tree.value[node_id]
        labels = (((label == 'root') and (node_id == 0)) or (label == 'all'))
        if special_characters:
            characters = ['&#35;', '<SUB>', '</SUB>', '&le;', '<br/>', '>']
            node_string = '<'
        else:
            characters = ['#', '[', ']', '<=', '\\n', '"']
            node_string = '"'
        if node_ids:
            if labels:
                node_string += 'node    '
            node_string += ((characters[0] + str(node_id)) + characters[4])
        if (tree.children_left[node_id] != _tree.TREE_LEAF):
            if (feature_names is not None):
                feature = feature_names[tree.feature[node_id]]
            else:
                feature = ('X%s%s%s' % (characters[1], tree.feature[node_id], characters[2]))
            node_string += ('%s    %s    %s%s' % (feature, characters[3], round(tree.threshold[node_id], precision), characters[4]))
        if impurity:
            if isinstance(criterion, _criterion.FriedmanMSE):
                criterion = 'friedman_mse'
            elif (not...