Get categories by access level

Hello,

Is it possible via the S2Member API to pass the access level to a function and return the categories set for a specific level in Restriction Options > Category Access Restrictions (https://prnt.sc/so7r1t).

Thanks in advance!