code: def _match_all_level(rule):
      if rule[:-1].find("/") >= 0 and not rule.startswith("**/"):
          if rule.startswith("/"):
              rule = rule[1:]
          return False, rule
      if rule.startswith("**/"):
          rule = rule[3:]
      return True, 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 4 for calling a global function with example usage: _match_all_level(rule) and returns: True,  rule, False,  rule