def METHOD_NAME(self, problem):
    """Converts a DCP problem to a conic form.
    """
    if not self.accepts(problem):
        raise ValueError("Cannot reduce problem to cone program")
    inverse_data = InverseData(problem)
    canon_objective, canon_constraints = self.canonicalize_tree(
        problem.objective, True)
    for constraint in problem.constraints:
        # canon_constr is the constraint rexpressed in terms of
        # its canonicalized arguments, and aux_constr are the constraints
        # generated while canonicalizing the arguments of the original
        # constraint
        canon_constr, aux_constr = self.canonicalize_tree(
            constraint, False)
        canon_constraints += aux_constr + [canon_constr]
        inverse_data.cons_id_map.update({constraint.id: canon_constr.id})
    new_problem = problems.problem.Problem(canon_objective,
                                           canon_constraints)
    return new_problem, inverse_data