code: def _get_regular_cells(cellarr: _vtk.vtkCellArray) -> NumpyArray[int]:
      """Return an array of shape (n_cells, cell_size) of point indices when all faces have the same size."""
      cells = _get_connectivity_array(cellarr)
      if len(cells) == 0:
          return cells
  
      offsets = _get_offset_array(cellarr)
      cell_size = offsets[1] - offsets[0]
      return cells.reshape(-1, cell_size)
  
imports: from __future__ import annotations
  from typing import List, Optional, Sequence, Tuple, Union, cast
  import numpy
  import pyvista
  from .None import _vtk_core
  from ._typing_core import Matrix, NumpyArray, Vector
  from .celltype import CellType
  from .dataset import DataObject
  from .errors import CellSizeError
  from .utilities.cells import ncells_from_cells, numpy_to_idarr
label_desc: Use image node_id 4 for calling a global function with example usage: _get_regular_cells(cellarr) and returns: cells, cells