def set_rules(rules, overwrite=True, use_conf=False):  # pragma: no cover
    """Set rules based on the provided dict of rules.

    Note:
        Used in tests only.

    :param rules: New rules to use. It should be an instance of dict
    :param overwrite: Whether to overwrite current rules or update them
                      with the new rules.
    :param use_conf: Whether to reload rules from config file.
    """
    init(use_conf=False)
    _ENFORCER.set_rules(rules, overwrite, use_conf)
Set rules based on the provided dict of rules.

    Note:
        Used in tests only.

    :param rules: New rules to use. It should be an instance of dict
    :param overwrite: Whether to overwrite current rules or update them
                      with the new rules.
    :param use_conf: Whether to reload rules from config file.