<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cdf(arr, **kwargs):
 """ ARGS arr array to calculate cumulative distribution function **kwargs Passed directly to numpy.histogram. Typical options include: bins = <num_bins> normed = True|False DESC Determines the cumulative distribution function. """

    counts, bin_edges = histogram(arr, **kwargs)
    cdf = cumsum(counts)
    return cdf