1473.7.
(a) A person no longer imprisoned or restrained may prosecute a motion to vacate a conviction or sentence for either of the following reasons:(1) The conviction or sentence is legally invalid due to a prejudicial error damaging the moving party’s ability to meaningfully understand, defend against, or knowingly accept the actual or potential adverse immigration consequences of a plea of guilty or nolo contendere.
(2) Newly discovered evidence of actual innocence exists that requires vacation of the conviction or sentence as a matter of law or in the interests of justice.
(b) A motion pursuant to paragraph (1) of subdivision (a) shall be filed with reasonable diligence after the later of the following:
(1) The date the moving party receives a notice to appear in immigration court or other notice from immigration authorities that asserts the conviction or sentence as a basis for removal.
(2) The date a removal order against the moving party, based on the existence of the conviction or sentence, becomes final.
(c) A motion pursuant to paragraph (2) of subdivision (a) shall be filed without undue delay from the date the moving party discovered, or could have discovered with the exercise of due diligence, the evidence that provides a basis for relief under this section.
(d) All motions shall be entitled to a hearing. At the request of the moving party, the court may hold the hearing without the personal presence of the moving party if counsel for the moving party is present and the court finds good cause as to why the moving party cannot be present.
(e) When ruling on the motion:
(1) The court shall grant the motion to vacate the conviction or sentence if the moving party establishes, by a preponderance of the evidence, the existence of any of the grounds for relief specified in subdivision (a).
(2) In granting or denying the motion, the court shall specify the basis for its conclusion.
(3) If the court grants the motion to vacate a conviction or sentence obtained through a plea of guilty or nolo contendere, the court shall allow the moving party to withdraw the plea.
(f) An order granting or denying the motion is appealable under subdivision (b) of Section 1237 as an order after judgment affecting the substantial rights of a party.