code: def _betai(a, b, x):
      x = np.asanyarray(x)
      x = ma.where(x < 1.0, x, 1.0)  # if x > 1 then return 1.0
      return special.betainc(a, b, x)
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from numpy import ndarray
  import numpy.ma
  from numpy.ma import masked, nomask
  from scipy._lib.six import iteritems
  import itertools
  import warnings
  from collections import namedtuple
  from .None import distributions
  import scipy.special
  from ._stats_mstats_common import _find_repeats, linregress, theilslopes, siegelslopes
label_desc: Use image node_id 9 for calling a global function with example usage: _betai(a, b, x) and returns: special