code: def load_ignore_file(self, path: str, ignore_file: Path):
      if path not in self.ignore_globs:
          self.ignore_globs[path] = []
      with ignore_file.open("r") as f:
          for line in f:
              line = self.rstrip(line.rstrip("\n")).rstrip("/")
              line = line.replace("\\ ", " ")
              if line.startswith("#") or not line:
                  continue
              self.ignore_globs[path].append(line)
  
file_path: dstack/src/dstack/_internal/utils/ignore.py
imports: import fnmatch
  from itertools import zip_longest
  from pathlib import Path
  from typing import Dict, List, Optional
  from dstack._internal.utils.path import PathLike
label_desc: Use image node_id 2 for calling the GitIgnore obj's underlying member method code with example usage: obj.load_ignore_file(path, ignore_file) without return types