def get_xrefs_to(functions): candidate_functions = {} for fva in functions: candidate_functions[fva] = len(list(idautils.XrefsTo(fva))) return candidate_functions