class_docstr: The :class:`GitIgnoreSpec` class extends :class:`pathspec.pathspec.PathSpec` to
  replicate *.gitignore* behavior.
class_docstr_tok: ["The",":","class",":","`","GitIgnoreSpec","`","class","extends",":","class",":","`","pathspec.pathspec.PathSpec","`","to","replicate","*",".gitignore","*","behavior","."]
code: def from_lines(
      cls: Type[Self],
      lines: Iterable[AnyStr],
      pattern_factory: Union[
          str, Callable[[AnyStr], Pattern], None
      ] = None,
  ) -> Self:
      ...
  
file_path: catboost/contrib/python/pathspec/pathspec/gitignore.py
imports: from typing import AnyStr, Callable, Iterable, Optional, Tuple, Type, TypeVar, Union, cast, overload
  from .pathspec import PathSpec
  from .pattern import Pattern
  from .patterns.gitwildmatch import GitWildMatchPattern, _DIR_MARK
  from .util import _is_iterable
label_desc: Use image node_id 3 for calling the GitIgnoreSpec obj's underlying member method code with example usage: obj.from_lines(cls, lines, pattern_factory) without return types