class_docstr: String Methods operating on object-dtype ndarrays.
class_docstr_tok: ["String","Methods","operating","on","object-dtype","ndarrays","."]
code: def _str_contains(
      self,
      pat,
      case: bool = True,
      flags: int = 0,
      na=np.nan,
      regex: bool = True,
  ):
      if regex:
          if not case:
              flags |= re.IGNORECASE
  
          pat = re.compile(pat, flags=flags)
  
          f = lambda x: pat.search(x) is not None
      else:
          if case:
              f = lambda x: pat in x
          else:
              upper_pat = pat.upper()
              f = lambda x: upper_pat in x.upper()
      return self._str_map(f, na, dtype=np.dtype("bool"))
  
imports: from __future__ import annotations
  import functools
  import re
  import sys
  import textwrap
  from typing import TYPE_CHECKING, Callable, Literal
  import unicodedata
  import numpy
  from pandas._libs import lib
  import pandas._libs.missing
  import pandas._libs.ops
  from pandas._typing import NpDtype, Scalar
  from pandas.core.dtypes.common import is_scalar
  from pandas.core.dtypes.missing import isna
  from pandas.core.strings.base import BaseStringArrayMethods
label_desc: Use image node_id 5 for calling the ObjectStringArrayMixin obj's underlying member method code with example usage: obj._str_contains(pat, case, flags, na, regex) and returns: self