code: def _escape_regex_range_chars(s: str) -> str:
      # escape these chars: ^-[]
      for c in r"\^-[]":
          s = s.replace(c, _bslash + c)
      s = s.replace("\n", r"\n")
      s = s.replace("\t", r"\t")
      return str(s)
  
imports: import inspect
  import warnings
  import types
  import collections
  import itertools
  from functools import lru_cache, wraps
  from typing import Callable, List, Union, Iterable, TypeVar, cast
label_desc: Use image node_id 4 for calling a global function with example usage: _escape_regex_range_chars(s) and returns: str