def METHOD_NAME(self):
    mdl = Model("k_color")
    x = {
        (vertex, color): mdl.binary_var(name=f"x_{vertex}_{color}")
        for vertex in self.G
        for color in range(self.k)
    }
    # Constraint: Each vertex must be assigned to exactly one color
    for vertex in self.G:
        mdl.add_constraint(
            mdl.sum(x[(vertex, color)] for color in range(self.k)) == 1
        )
    cost = 0
    # Constraint: Adjacent vertices cannot have the same color
    for vertex1 in self.G:
        for vertex2 in self.G:
            if vertex2 in self.G[vertex1]:
                for color in range(self.k):
                    cost += self.penalty * x[(vertex1, color)] * x[(vertex2, color)]
    # Objective function: Minimize the cost, finding a valid solution.
    mdl.minimize(cost)
    return mdl