def get_relaxation(self, A_configuration, B_configuration, I):
coefficients = collinsgisin_to_faacets(I)<EOL>M, ncIndices = get_faacets_moment_matrix(A_configuration,<EOL>B_configuration, coefficients)<EOL>self.n_vars = M.max() - <NUM_LIT:1><EOL>bs = len(M)  <EOL>self.block_struct = [bs]<EOL>self.F = lil_matrix((bs**<NUM_LIT:2>, self.n_vars + <NUM_LIT:1>))<EOL>for i in range(bs):<EOL><INDENT>for j in range(i, bs):<EOL><INDENT>if M[i, j] != <NUM_LIT:0>:<EOL><INDENT>self.F[i*bs+j, abs(M[i, j])-<NUM_LIT:1>] = copysign(<NUM_LIT:1>, M[i, j])<EOL><DEDENT><DEDENT><DEDENT>self.obj_facvar = [<NUM_LIT:0> for _ in range(self.n_vars)]<EOL>for i in range(<NUM_LIT:1>, len(ncIndices)):<EOL><INDENT>self.obj_facvar[abs(ncIndices[i])-<NUM_LIT:2>] +=copysign(<NUM_LIT:1>, ncIndices[i])*coefficients[i]<EOL><DEDENT>
Get the sparse SDP relaxation of a Bell inequality.

        :param A_configuration: The definition of measurements of Alice.
        :type A_configuration: list of list of int.
        :param B_configuration: The definition of measurements of Bob.
        :type B_configuration: list of list of int.
        :param I: The matrix describing the Bell inequality in the
                  Collins-Gisin picture.
        :type I: list of list of int.