code: def prepare_numerical_categorical(
      all_profiles, variables, variable_type
  ):
      # variables to use
      all_variables = (
          all_profiles["_vname_"].dropna().unique()
      )  # variables do not need to be string
  
      if variables is not None:
          all_variables_intersect = set(all_variables).intersection(
              set(variables)
          )
          if len(all_variables_intersect) == 0:
              raise ValueError(
                  "variables do not overlap with " + all_variables
              )
          all_variables = np.array(list(all_variables_intersect))
  
      # only numerical or only factors?
      is_numeric = np.empty_like(all_variables, bool)
      for i, var in enumerate(all_variables):
          is_numeric[i] = pd.api.types.is_numeric_dtype(
              all_profiles[var]
          )
  
      if variable_type == "numerical":
          vnames = all_variables[is_numeric]
          if vnames.shape[0] == 0:
              raise ValueError("There are no numerical variables")
  
          all_profiles["_x_"] = 0.0
  
      else:
          vnames = all_variables[~is_numeric]
          if variables is not None:
              # take all if the user wants to convert numerical into categorical
              vnames = all_variables
          elif vnames.shape[0] == 0:
              raise ValueError("There are no non-numerical variables")
  
          all_profiles["_x_"] = ""
  
      return all_profiles, vnames
  
file_path: DALEX/python/dalex/dalex/model_explanations/_aggregated_profiles/utils.py
imports: import numpy
  import pandas
  from tqdm import tqdm
label_desc: Use image node_id 4 for calling a global function with example usage: prepare_numerical_categorical(all_profiles, variables, variable_type) and returns: all_profiles,  vnames