code: def predict_RAM_usage(
      X: np.ndarray, categorical: List[bool]
  ) -> float:
      # Return estimated RAM usage of dataset after OneHotEncoding in bytes.
      estimated_columns = 0
      for i, cat in enumerate(categorical):
          if cat:
              unique_values = np.unique(X[:, i])
              num_unique_values = np.sum(np.isfinite(unique_values))
              estimated_columns += num_unique_values
          else:
              estimated_columns += 1
      estimated_ram = estimated_columns * X.shape[0] * X.dtype.itemsize
      return estimated_ram
  
imports: from typing import Any, Dict, Iterator, List, Mapping, Optional, Sequence, Tuple, Type, Union, cast
  import warnings
  import numpy
  import pandas
  from scipy.sparse import spmatrix
  from sklearn.model_selection import train_test_split
  from autosklearn.evaluation.splitter import CustomStratifiedShuffleSplit
label_desc: Use image node_id 6 for calling a global function with example usage: predict_RAM_usage(X, categorical) and returns: estimated_ram