def METHOD_NAME(self, pkg):
    try:
        seen_id_map, expected_var, allowed_ids = self.category_map[pkg.category]
    except KeyError:
        return
    for line in pkg.ebuild.text_fileobj():
        m = self.id_re.match(line)
        if m is not None and m.group("var") == expected_var:
            found_id = int(m.group("id"))
            break
    else:
        yield MissingAccountIdentifier(f"ACCT_{expected_var}_ID", pkg=pkg)
        return
    if not any(found_id in id_range for id_range in allowed_ids):
        yield OutsideRangeAccountIdentifier(expected_var.lower(), found_id, pkg=pkg)
        return
    seen_id_map[found_id][pkg.key].append(pkg)