TMZ has learned Nicole Richie will appear in court Friday and will cop a plea in her DUI case.

Sources tell TMZ Richie will plead either guilty or no contest to DUI. She will appear before the Court Commissioner, who will sentence her on the spot. Sources say Richie will receive a minimum sentence of five days in jail. By law, anyone with two DUI convictions must serve at least five days. This conviction will be Nicole's second DUI.

Nicole was arrested on December 11, after cops say she drove the wrong way on a California highway.