code: def ignore_remove(self, path: str) -> None:
      from scmrepo.exceptions import FileNotInRepoError
  
      from dvc.scm import SCMError
  
      logger.debug("Removing '%s' from gitignore file.", path)
      try:
          gitignore_file = self.scm.ignore_remove(path)
      except FileNotInRepoError as exc:
          raise SCMError(str(exc))  # noqa: B904
  
      if gitignore_file:
          return self.track_file(relpath(gitignore_file))
  
file_path: dvc/dvc/repo/scm_context.py
imports: import logging
  import shlex
  from contextlib import contextmanager
  from functools import wraps
  from typing import TYPE_CHECKING, Any, Dict, Iterable, Iterator, List, Optional, Set, Union
  from dvc.log import logger
  from dvc.utils import relpath
  from dvc.utils.collections import ensure_list
label_desc: Use image node_id 7 for calling the SCMContext obj's underlying member method code with example usage: obj.ignore_remove(path) and returns: self