'How to search for simulink subsystems?

I have a code that compares some blocks in a Matlab R2020b Simulink application, but it keeps updating and now it doesn't work anymore, because some libraries have been changed to some "referenced subsystems"

for fi = 1:numel(all_libs)
if contains(all_libs(fi).Library, '_function') || contains(all_libs(fi).Library, '_Funktion')

this is the part of the code that searched in libraries, but now they don't exist anymore. How can I make it to search for those referenced subsystems?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source