A recent Michigan Court of Appeals case, Bolz v. Bolz, shows why it is so important that you have the help of an attorney when it comes to life-affecting legal matters. In this case, a mother was given "sole legal and physical custody" of the couple's children in the divorce, "until the [father] has completed his substance abuse program and has been sober for one year."
To the father, and even to the trial court judge, this apparently meant that once the father was sober for a year, and through the program, that he would have joint custody of the children, or at least be able to get joint custody just by showing that he had completed the requirements. But, in Michigan, there is no such thing as "temporary" custody. Custody is either sole, or joint.
A parent can always go to court and try to convince a judge that there is some good reason for changing custody, but custody doesn't automatically change, despite what you may think the order says. The father probably thought he had won some benefit, where he would get joint custody when he completed the substance abuse program. But what he really got was worse than the default of "sole custody" to the mother. What the divorce judgment really meant was that until he was sober for a year, the court wouldn't even consider changing custody.
Having your insobriety clearly written out in a divorce judgment is probably not going to help you in the future with getting custody back, and divorce judgments are public records. Anyone in the future will be able to look this up and see that this father had some serious problems. (And now that it's gone to the Court of Appeals, that fact has been even more publicized.)
So, please remember, just because something looks like it means one thing, the legal meaning can be quite different. In this case, having sole legal custody also means that the mother will probably be able to move the children out of the state, and the father will probably have very few chances to see his children. I am guessing that this is not the outcome he expected when they first signed the divorce papers.