def METHOD_NAME(kb_info_json, rules_key, info_dict):
    """Return the rules.mk line(s) for a mapping rule.
    """
    if not info_dict.get('to_c', True):
        return None
    info_key = info_dict['info_key']
    key_type = info_dict.get('value_type', 'raw')
    try:
        rules_value = kb_info_json[info_key]
    except KeyError:
        return None
    if key_type in ['array', 'list']:
        return f'{rules_key} ?= {" ".join(rules_value)}'
    elif key_type == 'bool':
        return f'{rules_key} ?= {"yes" if rules_value else "no"}'
    elif key_type == 'mapping':
        return '\n'.join([f'{key} ?= {value}' for key, value in rules_value.items()])
    elif key_type == 'str':
        return f'{rules_key} ?= "{rules_value}"'
    return f'{rules_key} ?= {rules_value}'