If an appeal has been taken from a judgment entered by any court of the State of California, or if the time for taking an appeal has not expired, a party may obtain discovery within the scope delimited by Chapters 2 (commencing with Section 2017.010) and 3 (commencing with Section 2017.710), and subject to the restrictions set forth in Chapter 5 (commencing with Section 2019.010), for the purpose of perpetuating testimony or preserving information for use in the event of further proceedings in that court.
Source:
Section 2036.010, https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=CCP§ionNum=2036.010.
.