class_docstr: Sampler is a wrapper that provides sampling capabilities for the wrapped analyses.
  The sampling is performed for all datasets in `args` and passed to all `children` during `fit` call shadowing outer parameters.
  
  Parameters
  ----------
  sample: Union[None, int, float], default = None
      sample size; if `int`, then row number is used;
      `float` must be between 0.0 and 1.0 and represents fraction of dataset to sample;
      `None` means no sampling
  parent: Optional[AbstractAnalysis], default = None
      parent Analysis
  children: Optional[List[AbstractAnalysis]], default None
      wrapped analyses; these will receive sampled `args` during `fit` call
  
  Examples
  --------
  >>> from autogluon.eda.analysis.base import BaseAnalysis
  >>> from autogluon.eda.analysis import Sampler
  >>> import pandas as pd
  >>> import numpy as np
  >>>
  >>> df_train = pd.DataFrame(np.random.randint(0, 100, size=(10, 4)), columns=list('ABCD'))
  >>> df_test = pd.DataFrame(np.random.randint(0, 100, size=(20, 4)), columns=list('EFGH'))
  >>> analysis = BaseAnalysis(train_data=df_train, test_data=df_test, children=[
  >>>     Sampler(sample=5, children=[
  >>>         # Analysis here will be performed on a sample of 5 for both train_data and test_data
  >>>     ])
  >>> ])
class_docstr_tok: ["Sampler","is","a","wrapper","that","provides","sampling","capabilities","for","the","wrapped","analyses",".","The","sampling","is","performed","for","all","datasets","in","`","args","`","and","passed","to","all","`","children","`","during","`","fit","`","call","shadowing","outer","parameters",".","Parameters","--","--","--","--","--","sample",":","Union","[","None",",","int",",","float","]",",","default","=","None","sample","size",";","if","`","int","`",",","then","row","number","is","used",";","`","float","`","must","be","between","0.0","and","1.0","and","represents","fraction","of","dataset","to","sample",";","`","None","`","means","no","sampling","parent",":","Optional","[","AbstractAnalysis","]",",","default","=","None","parent","Analysis","children",":","Optional","[","List","[","AbstractAnalysis","]","]",",","default","None","wrapped","analyses",";","these","will","receive","sampled","`","args","`","during","`","fit","`","call","Examples","--","--","--","--",">",">",">","from","autogluon.eda.analysis.base","import","BaseAnalysis",">",">",">","from","autogluon.eda.analysis","import","Sampler",">",">",">","import","pandas","as","pd",">",">",">","import","numpy","as","np",">",">",">",">",">",">","df_train","=","pd.DataFrame","(","np.random.randint","(","0",",","100",",","size=","(","10",",","4",")",")",",","columns=list","(","'ABCD","'",")",")",">",">",">","df_test","=","pd.DataFrame","(","np.random.randint","(","0",",","100",",","size=","(","20",",","4",")",")",",","columns=list","(","'EFGH","'",")",")",">",">",">","analysis","=","BaseAnalysis","(","train_data=df_train",",","test_data=df_test",",","children=","[",">",">",">","Sampler","(","sample=5",",","children=","[",">",">",">","#","Analysis","here","will","be","performed","on","a","sample","of","5","for","both","train_data","and","test_data",">",">",">","]",")",">",">",">","]",")"]
code: def _fit(
      self, state: AnalysisState, args: AnalysisState, **fit_kwargs
  ) -> None:
      if self.sample is not None:
          for ds, df in self.available_datasets(args):
              arg = "n"
              if self.sample is not None and isinstance(
                  self.sample, float
              ):
                  arg = "frac"
              if len(df) > self.sample:
                  df = df.sample(**{arg: self.sample}, random_state=0)
                  if state.sample_size is None:
                      state.sample_size = {}
                  state.sample_size[ds] = self.sample
              self.args[ds] = df
  
imports: from __future__ import annotations
  from typing import Any, Dict, List, Optional, Set, Union
  import numpy
  import pandas
  from autogluon.common.features.infer_types import get_type_group_map_special, get_type_map_raw
  from autogluon.common.features.types import R_BOOL, R_CATEGORY, R_FLOAT, R_INT, R_OBJECT
  from ..state import AnalysisState
  from .base import AbstractAnalysis
  from autogluon.core.constants import BINARY, MULTICLASS, PROBLEM_TYPES_CLASSIFICATION, PROBLEM_TYPES_REGRESSION, REGRESSION
  from autogluon.core.utils import generate_train_test_split_combined, infer_problem_type
label_desc: Use image node_id 3 for calling the Sampler obj's underlying member method code with example usage: obj._fit(state, args) without return types