<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _do_lumping(self):
 """Perform PCCA+ algorithm by optimizing transformation matrix A. Creates the following member variables: ------- A : ndarray The transformation matrix. chi : ndarray The membership matrix microstate_mapping : ndarray Mapping from microstates to macrostates. """

        right_eigenvectors = self.right_eigenvectors_[:, :self.n_macrostates]
        index = index_search(right_eigenvectors)

        # compute transformation matrix A as initial guess for local
        # optimization (maybe not feasible)
        A = right_eigenvectors[index, :]

        A = inv(A)
        A = fill_A(A, right_eigenvectors)

        if self.do_minimization:
            A = self._optimize_A(A)

        self.A_ = fill_A(A, right_eigenvectors)
        self.chi_ = dot(right_eigenvectors, self.A_)
        self.microstate_mapping_ = np.argmax(self.chi_, 1)