human
What is a Python program to find 8 whales and 1 shark, in the given the following:
Complete the below
def fisher_exact(table, alternative='two-sided'):

    ''''Performs a Fisher exact test on a 2x2 contingency table.
    Parameters
    table : array_like of ints
    A 2x2 contingency table.  Elements should be non-negative integers.
    alternative : {\'two-sided\', \'less\', \'greater\'}, optional
    Which alternative hypothesis to the null hypothesis the test uses.
    Default is \'two-sided\'.
    Returns
    oddsratio : float
    This is prior odds ratio and not a posterior estimate.
    p_value : float
    P-value, the probability of obtaining a distribution at least as
    extreme as the one that was actually observed, assuming that the
    null hypothesis is true.
    See Also
    chi2_contingency : Chi-square test of independence of variables in a
    contingency table.
    Notes
    The calculated odds ratio is different from the one R uses. This scipy
    implementation returns the (more common) "unconditional Maximum
    Likelihood Estimate", while R uses the "conditional Maximum Likelihood
    Estimate".
    For tables with large numbers, the (inexact) chi-square test implemented
    in the function `chi2_contingency` can also be used.
    Examples
    Say we spend a few days counting whales and sharks in the Atlantic and
    Indian oceans. In the Atlantic ocean we find 8 whales and 1 shark, in the
    Indian ocean 2 whales and 5 sharks. Then our contingency table is::
    Atlantic  Indian
    whales     8        2
    sharks     1        5
    We use this table to find the p-value:
    >>> import scipy.stats as stats
    >>> oddsratio, pvalue = stats.fisher_exact([[8, 2], [1, 5]])
    >>> pvalue
    0.0349...
    The probability that we would observe this or an even more imbalanced ratio
    by chance is about 3.5%.  A commonly used significance level is 5%--if we
    adopt that, we can therefore conclude that our observed imbalance is
    statistically significant.
whales prefer the Atlantic while sharks prefer
    the Indian ocean.'
    '''
assistant
#Here is Python program to find 8 whales and 1 shark, in the
.
    hypergeom = distributions.hypergeom
    c = np.asarray(table, dtype=np.int64)
    if (not (c.shape == (2, 2))):
        raise ValueError('The    input    `table`    must    be    of    shape    (2,    2).')
    if np.any((c < 0)):
        raise ValueError('All    values    in    `table`    must    be    nonnegative.')
    if ((0 in c.sum(axis=0)) or (0 in c.sum(axis=1))):
        return (np.nan, 1.0)
    if ((c[(1, 0)] > 0) and (c[(0, 1)] > 0)):
        oddsratio = ((c[(0, 0)] * c[(1, 1)]) / float((c[(1, 0)] * c[(0, 1)])))
    else:
        oddsratio = np.inf
    n1 = (c[(0, 0)] + c[(0, 1)])
    n2 = (c[(1, 0)] + c[(1, 1)])
    n = (c[(0, 0)] + c[(1, 0)])
    def binary_search(n, n1, n2, side):
        'Binary    search    for    where    to    begin    lower/upper    halves    in    two-sided\n                                test.\n                                '
        if (side == 'upper'):
            minval = mode
            maxval = n
        else:
            minval = 0
            maxval = mode
        guess = (-1)
        while ((maxval - minval) > 1):
            if ((maxval == (minval + 1)) and (guess == minval)):
                guess = maxval
            else:
                guess = ((maxval + minval) // 2)
            pguess = hypergeom.pmf(guess, (n1 + n2), n1, n)
            if (side == 'upper'):
                ng = (guess - 1)
            else:
                ng = (guess + 1)
            if (pguess <= pexact < hypergeom.pmf(ng, (n1 + n2), n1, n)):
                break
            elif (pguess < pexact):
                maxval = guess
            else:
                minval = guess
        if (guess == (-1)):
            guess = minval
        if (side == 'upper'):
            while ((guess > 0) and (hypergeom.pmf(guess, (n1 + n2), n1, n) < (pexact * epsilon))):
                guess -= 1
            while (hypergeom.pmf(guess, (n1 + n2), n1, n) > (pexact / epsilon)):
                guess += 1
        else:
            while (hypergeom.pmf(guess, (n1 + n2), n1, n) < (pexact *...