def filter_creds_by_caller(creds, caller_hrn_list):
        """
        Returns a list of creds who's gid caller matches the
        specified caller hrn
        """
        if not isinstance(creds, list): creds = [creds]
        if not isinstance(caller_hrn_list, list): 
            caller_hrn_list = [caller_hrn_list]
        caller_creds = []
        for cred in creds:
            try:
                tmp_cred = Credential(string=cred)
                if tmp_cred.get_gid_caller().get_hrn() in caller_hrn_list:
                    caller_creds.append(cred)
            except: pass
        return caller_creds
dataset/ETHPy150Open fp7-ofelia/ocf/ofam/src/src/foam/sfa/trust/credential.py/filter_creds_by_caller/original