code: def _endwith(s: str, suffixes: List[str]):
      return any(s.endswith(suffix) for suffix in suffixes)
  
file_path: nni/nni/compression/utils/external/external_replacer.py
imports: from __future__ import annotations
  from collections import defaultdict
  import logging
  import re
  from typing import TYPE_CHECKING, List
  import torch
  from torch.utils._pytree import tree_map
  from .huggingface import parser_factory, HuggingfaceModelParser
  from ..attr import get_nested_attr
  from ...speedup.replacer import Replacer
label_desc: Use image node_id 1 for calling a global function with example usage: _endwith(s, suffixes) and returns: any