<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def numpy_histogram(a, bins=10, range=None, normed=False, weights=None):
    '''A version of numpy.histogram that accounts for numpy's version'''
    args = inspect.getargs(np.histogram.__code__)[0]
    if args[-1] == "new":
        return np.histogram(a, bins, range, normed, weights, new=True)
    return np.histogram(a, bins, range, normed, weights)