(external_refs)
return result
Get external library dependencies for all policies excluding the default
    linux policy
    :param external_refs: external references for all policies
    :return: {realpath: soname} e.g.
    {'/path/to/external_ref.so.1.2.3': 'external_ref.so.1'}
Get external library dependencies for all policies excluding the default
    linux policy
    :param external_refs: external references for all policies
    :return: {realpath: soname} e.g.
    {'/path/to/external_ref.so.1.2.3': 'external_ref.so.1'}
Get external library dependencies for all policies excluding the default linux policy : param external_refs : external references for all policies : return : { realpath : soname } e . g . { / path / to / external_ref . so . 1 . 2 . 3 : external_ref . so . 1 }
def get_external_libs(external_refs) -> Dict[str, str]:
    """Get external library dependencies for all policies excluding the default
    linux policy
    :param external_refs: external references for all policies
    :return: {realpath: soname} e.g.
    {'/path/to/external_ref.so.1.2.3': 'external_ref.so.1'}
    """
    result: Dict[str, str] = {}
    for policy in external_refs.values():
        # linux tag (priority 0) has no white-list, do not analyze it
        if policy["priority"] == 0:
            continue
        # go through all libs, retrieving their soname and realpath
        for libname, realpath in policy["libs"].items():
            if realpath and realpath not in result.keys():
                result[realpath] = libname
    return result
def get_external_libs ( external_refs ) -> Dict [ str , str ] : result : Dict [ str , str ] = { } for policy in external_refs . values ( ) : # linux tag (priority 0) has no white-list, do not analyze it if policy [ "priority" ] == 0 : continue # go through all libs, retrieving their soname and realpath for libname , realpath in policy [ "libs" ] . items ( ) : if realpath and realpath not in result . keys ( ) : result [ realpath ] = libname return result