code: def change_rule(rule, rel):
      rule = rule.strip()
      if _is_comment(rule):
          return rule
      not_ignore, rule = _not_ignore(rule)
      match_all, rule = _match_all_level(rule)
      rule = _remove_slash(rule)
      if not match_all:
          rule = f"/{rule}"
      else:
          rule = f"/**/{rule}"
      if not_ignore:
          rule = f"!/{rel}{rule}"
      else:
          rule = f"/{rel}{rule}"
      return normalize_file(rule)
  
file_path: dvc/dvc/pathspec_math.py
imports: from collections import namedtuple
  from pathspec.util import normalize_file
  from dvc.utils import relpath
label_desc: Use image node_id 5 for calling a global function with example usage: change_rule(rule, rel) and returns: normalize_file, rule