code: def _calc_size(
      cls, size: int, level: Union[List, int], dtypes: pd.Series
  ):
      index = dtypes.index
  
      if not isinstance(index, pd.MultiIndex):
          return size * len(index)
  
      if isinstance(level, int):
          level = [level]
      return (
          size * np.prod([index.levshape[lev] for lev in level]).item()
      )
  
imports: from typing import Union, List
  import numpy
  import pandas
  from ...None import opcodes
  from ...core import recursive_tile
  from ...serialization.serializables import KeyField, AnyField, BoolField
  from ...utils import has_unknown_shape
  from ..operands import DataFrameOperand, DataFrameOperandMixin
  from ..utils import build_df, parse_index
label_desc: Use image node_id 6 for calling the DataFrameStack obj's underlying member method code with example usage: obj._calc_size(cls, size, level, dtypes) and returns: unknown, unknown