code: def _reset_df_and_get_size(df):
      df.reset_state()
      try:
          sz = len(df)
      except NotImplementedError:
          sz = 0
      return sz
  
imports: import numpy
  import os
  import platform
  from collections import defaultdict
  from ..utils import logger
  from ..utils.serialize import dumps, loads
  from ..utils.develop import create_dummy_class
  from ..utils.utils import get_tqdm
  from .base import DataFlow
  from .common import FixedSizeData, MapData
  from .format import HDF5Data, LMDBData, DiskCacheData
  from .raw import DataFromGenerator, DataFromList
label_desc: Use image node_id 1 for calling a global function with example usage: _reset_df_and_get_size(df) and returns: sz