def METHOD_NAME(self, print_solution=False):
    # Modelled after https://developers.google.com/optimization/assignment/assignment_teams
    costs = self.calculate_distance_matrix()
    user_count = len(costs)
    case_count = len(costs[0])
    # Solver
    # Create the mip solver with the SCIP backend.
    solver = pywraplp.Solver.CreateSolver("SCIP")
    if not solver:
        return
    # Variables
    # x[i, j] is an array of 0-1 variables, which will be 1
    # if user i is assigned to case j.
    x = {}
    for i in range(user_count):
        for j in range(case_count):
            x[i, j] = solver.IntVar(0, 1, "")
    # Constraints
    # Each user is assigned to at most case_count/user_count
    for i in range(user_count):
        solver.Add(solver.Sum([x[i, j] for j in range(case_count)]) <= int(case_count / user_count) + 1)
    # Each case is assigned to exactly one user.
    for j in range(case_count):
        solver.Add(solver.Sum([x[i, j] for i in range(user_count)]) == 1)
    # Objective
    objective_terms = []
    for i in range(user_count):
        for j in range(case_count):
            objective_terms.append(costs[i][j] * x[i, j])
    solver.Minimize(solver.Sum(objective_terms))
    # Solve
    status = solver.Solve()
    solution = {loc['id']: [] for loc in self.user_locations}
    # Print solution.
    if status == pywraplp.Solver.OPTIMAL or status == pywraplp.Solver.FEASIBLE:
        if print_solution:
            print(f"Total cost = {solver.Objective().Value()}\n")
        for i in range(user_count):
            for j in range(case_count):
                # Test if x[i,j] is 1 (with tolerance for floating point arithmetic).
                if x[i, j].solution_value() > 0.5:
                    solution[self.user_locations[i]['id']].append(self.case_locations[j]['id'])
                    if print_solution:
                        print(f"Case {self.case_locations[j]['id']} assigned to "
                              f"user {self.user_locations[i]['id']}. "
                              f"Cost: {costs[i][j]}")
    else:
        if print_solution:
            print("No solution found.")
    return solution