def get_confidence_interval(self, node, interval = (<NUM_LIT>, <NUM_LIT>)):
rate_contribution = self.date_uncertainty_due_to_rate(node, interval)<EOL>if hasattr(node, "<STR_LIT>"):<EOL><INDENT>min_date, max_date = [self.date2dist.to_numdate(x) for x in<EOL>(node.marginal_pos_LH.xmax, node.marginal_pos_LH.xmin)]<EOL>if node.marginal_inverse_cdf=="<STR_LIT>":<EOL><INDENT>return np.array([node.numdate, node.numdate])<EOL><DEDENT>else:<EOL><INDENT>mutation_contribution = self.date2dist.to_numdate(node.marginal_inverse_cdf(np.array(interval))[::-<NUM_LIT:1>])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>min_date, max_date = [-np.inf, np.inf]<EOL><DEDENT>return self.combine_confidence(node.numdate, (min_date, max_date),<EOL>c1=rate_contribution, c2=mutation_contribution)<EOL>
If temporal reconstruction was done using the marginal ML mode, the entire distribution of
times is available. This function determines the 90% (or other) confidence interval, defined as the
range where 5% of probability is below and above. Note that this does not necessarily contain
the highest probability position.
In absense of marginal reconstruction, it will return uncertainty based on rate
variation. If both are present, the wider interval will be returned.

Parameters
----------

 node : PhyloTree.Clade
    The node for which the confidence interval is to be calculated

 interval : tuple, list
    Array of length two, or tuple, defining the bounds of the confidence interval

Returns
-------

 confidence_interval : numpy array
    Array with two numerical dates delineating the confidence interval