class_docstr: Extension dtype for boolean data.
  
  .. warning::
  
     BooleanDtype is considered experimental. The implementation and
     parts of the API may change without warning.
  
  Attributes
  ----------
  None
  
  Methods
  -------
  None
  
  Examples
  --------
  >>> pd.BooleanDtype()
  BooleanDtype
class_docstr_tok: ["Extension","dtype","for","boolean","data",".","..","warning",":",":","BooleanDtype","is","considered","experimental",".","The","implementation","and","parts","of","the","API","may","change","without","warning",".","Attributes","--","--","--","--","--","None","Methods","--","--","--","-","None","Examples","--","--","--","--",">",">",">","pd.BooleanDtype","(",")","BooleanDtype"]
docstr: Construct BooleanArray from pyarrow Array/ChunkedArray.
docstr_tok: ["Construct","BooleanArray","from","pyarrow","Array\/ChunkedArray","."]
code: def __from_arrow__(
      self, array: pyarrow.Array | pyarrow.ChunkedArray
  ) -> BooleanArray:
      """
      Construct BooleanArray from pyarrow Array/ChunkedArray.
      """
      import pyarrow
  
      if array.type != pyarrow.bool_():
          raise TypeError(
              f"Expected array of boolean type, got {array.type} instead"
          )
  
      if isinstance(array, pyarrow.Array):
          chunks = [array]
      else:
          # pyarrow.ChunkedArray
          chunks = array.chunks
  
      results = []
      for arr in chunks:
          buflist = arr.buffers()
          data = pyarrow.BooleanArray.from_buffers(
              arr.type, len(arr), [None, buflist[1]], offset=arr.offset
          ).to_numpy(zero_copy_only=False)
          if arr.null_count != 0:
              mask = pyarrow.BooleanArray.from_buffers(
                  arr.type,
                  len(arr),
                  [None, buflist[0]],
                  offset=arr.offset,
              ).to_numpy(zero_copy_only=False)
              mask = ~mask
          else:
              mask = np.zeros(len(arr), dtype=bool)
  
          bool_arr = BooleanArray(data, mask)
          results.append(bool_arr)
  
      if not results:
          return BooleanArray(
              np.array([], dtype=np.bool_), np.array([], dtype=np.bool_)
          )
      else:
          return BooleanArray._concat_same_type(results)
  
imports: from __future__ import annotations
  import numbers
  from typing import TYPE_CHECKING, cast
  import numpy
  from pandas._libs import lib, missing
  from pandas._typing import Dtype, DtypeObj, type_t
  from pandas.core.dtypes.common import is_list_like, is_numeric_dtype
  from pandas.core.dtypes.dtypes import register_extension_dtype
  from pandas.core.dtypes.missing import isna
  from pandas.core import ops
  from pandas.core.array_algos import masked_accumulations
  from pandas.core.arrays.masked import BaseMaskedArray, BaseMaskedDtype
label_desc: Use image node_id 8 for calling the BooleanDtype obj's underlying member method code with example usage: obj.__from_arrow__(array) and returns: BooleanArray, BooleanArray