code: def is_re_compilable(obj: object) -> bool:
      """
      Check if the object can be compiled into a regex pattern instance.
  
      Parameters
      ----------
      obj : The object to check
  
      Returns
      -------
      bool
          Whether `obj` can be compiled as a regex pattern.
  
      Examples
      --------
      >>> from pandas.api.types import is_re_compilable
      >>> is_re_compilable(".*")
      True
      >>> is_re_compilable(1)
      False
      """
      try:
          re.compile(obj)  # type: ignore[call-overload]
      except TypeError:
          return False
      else:
          return True
  
file_path: pandas/pandas/core/dtypes/inference.py
imports: from __future__ import annotations
  from collections import abc
  from numbers import Number
  import re
  from re import Pattern
  from typing import TYPE_CHECKING
  import numpy
  from pandas._libs import lib
label_desc: Use image node_id 5 for calling a global function with example usage: is_re_compilable(obj) and returns: True, False