def calc_fock_matrix(mol_, h_core_, er_ints_, Duv_):
    """
    calc_fock_matrix - Calculates the Fock Matrix of the molecule

    Arguments:
        mol_: the PySCF molecule data structure created from Input
        h_core_: the one electron hamiltonian matrix
        er_ints_: the 2e electron repulsion integrals
        Duv_: the density matrix

    Returns:
        Fuv: The fock matrix

    """

    Fuv = h_core_.copy()  # Takes care of the Huv part of the fock matrix
    num_aos = mol_.nao    # Number of atomic orbitals, dimension of the mats

    # solving coulomb term and add to fock matrix
    for u in range(num_aos):
        for v in range(num_aos):
            Fuv[u, v] += (Duv_ * er_ints_[u, v]).sum()

    # solving exchange term and subtract from value stored in fock matrix
    for u in range(num_aos):
        for v in range(num_aos):
            Fuv[u, v] -= (0.5 * Duv_ * er_ints_[u, :, v]).sum()
    """
    Replace with your implementation

    Here you will do the summation of the last two terms in the Fock matrix
    equation involving the two electron Integrals

    Hint: You can do this with explicit loops over matrix indices, whichwill
          have many for loops.

    This can also be done with numpy aggregations, bonus points if you
    implement this with only two loops.

    For example, the first term can be implemented like the following:
    (er_ints[mu,nu]*Duv).sum()
    """

    return Fuv