def METHOD_NAME(args):
    platform_rules = get_platform_rules(args)
    product_dir = os.path.join(args.root, "products", args.product)
    product_yaml_path = os.path.join(product_dir, "product.yml")
    env_yaml = ssg.environment.open_environment(
        args.build_config_yaml, product_yaml_path, os.path.join(args.root, "product_properties"))
    known_rules = dict()
    for rule in platform_rules:
        try:
            rule_obj = handle_rule_yaml(args, rule['id'],
                                        rule['dir'], rule['guide'], env_yaml)
        except ssg.yaml.DocumentationNotComplete:
            sys.stderr.write('Rule %s throw DocumentationNotComplete' % rule['id'])
            # Happens on non-debug build when a rule is "documentation-incomplete"
            continue
        if args.reference in rule_obj['references'].keys():
            refs = rule_obj['references'][args.reference]
            if ',' in refs:
                refs = refs.split(',')
            else:
                refs = [refs]
            for ref in refs:
                if ref in known_rules:
                    known_rules[ref].append(rule['id'])
                else:
                    known_rules[ref] = [rule['id']]
    return known_rules