def a_vector_MLE(a, y, term, m_dict, bounds, boundedness):
    'TODO: write docstring\n\n    '
    ym = [newtons_method_metalog(a, xi, term, bounds, boundedness) for xi in m_dict['dataValues']['x']]

    def MLE_quantile_constraints(x):
        M = [quantileMetalog(x[:term], yi, term, bounds=bounds, boundedness=boundedness) for yi in x[term:]]
        return (m_dict['dataValues']['x'] - M)

    def MLE_objective_function(x, y, term, m_dict):
        return (- np.sum([np.log10(pdfMetalog(x[:term], yi, term, bounds, boundedness)) for yi in np.absolute(x[term:])]))
    m_dict[str(('MLE' + str(term)))] = {}
    x0 = np.hstack((a[:term], ym))
    m_dict[str(('MLE' + str(term)))]['oldobj'] = (- MLE_objective_function(x0, y, term, m_dict))
    bnd = ((((None, None),) * len(a)) + (((0, 1),) * (len(x0) - len(a))))
    con = NonlinearConstraint(MLE_quantile_constraints, 0, 0)
    mle = minimize(MLE_objective_function, x0, args=(y, term, m_dict), bounds=bnd, constraints=con)
    m_dict[str(('MLE' + str(term)))]['newobj'] = (- MLE_objective_function(mle.x, y, term, m_dict))
    m_dict[str(('MLE' + str(term)))]['A'] = mle.x[:term]
    m_dict[str(('MLE' + str(term)))]['Y'] = mle.x[term:]
    m_dict[str(('MLE' + str(term)))]['oldA'] = a
    m_dict[str(('MLE' + str(term)))]['oldY'] = y
    out_temp = np.zeros_like(a)
    for i in range(term):
        out_temp[i] = mle.x[i]
    return out_temp
TODO: write docstring
def a_vector_MLE(a, y, term, m_dict, bounds, boundedness):
    '\n\n    '
    ym = [newtons_method_metalog(a, xi, term, bounds, boundedness) for xi in m_dict['dataValues']['x']]

    def MLE_quantile_constraints(x):
        M = [quantileMetalog(x[:term], yi, term, bounds=bounds, boundedness=boundedness) for yi in x[term:]]
        return (m_dict['dataValues']['x'] - M)

    def MLE_objective_function(x, y, term, m_dict):
        return (- np.sum([np.log10(pdfMetalog(x[:term], yi, term, bounds, boundedness)) for yi in np.absolute(x[term:])]))
    m_dict[str(('MLE' + str(term)))] = {}
    x0 = np.hstack((a[:term], ym))
    m_dict[str(('MLE' + str(term)))]['oldobj'] = (- MLE_objective_function(x0, y, term, m_dict))
    bnd = ((((None, None),) * len(a)) + (((0, 1),) * (len(x0) - len(a))))
    con = NonlinearConstraint(MLE_quantile_constraints, 0, 0)
    mle = minimize(MLE_objective_function, x0, args=(y, term, m_dict), bounds=bnd, constraints=con)
    m_dict[str(('MLE' + str(term)))]['newobj'] = (- MLE_objective_function(mle.x, y, term, m_dict))
    m_dict[str(('MLE' + str(term)))]['A'] = mle.x[:term]
    m_dict[str(('MLE' + str(term)))]['Y'] = mle.x[term:]
    m_dict[str(('MLE' + str(term)))]['oldA'] = a
    m_dict[str(('MLE' + str(term)))]['oldY'] = y
    out_temp = np.zeros_like(a)
    for i in range(term):
        out_temp[i] = mle.x[i]
    return out_temp