code: def set_default_values(model: Model, data_dict: dict) -> dict:
      """
      Set default values for each variable in the model if the user did not
      pass them in the data_dict.
      """
      # set unspecified covariates to "typical" values
      unique_covariates = get_model_covariates(model)
      for name in unique_covariates:
          if name not in data_dict:
              x = model.data[name]
              if (
                  is_numeric_dtype(x)
                  or is_integer_dtype(x)
                  or is_float_dtype(x)
              ):
                  data_dict[name] = np.array([np.mean(x)])
              elif (
                  is_categorical_dtype(x)
                  or is_string_dtype(x)
                  or is_object_dtype(x)
              ):
                  data_dict[name] = np.array([mode(x)])
              else:
                  raise TypeError(
                      f"Unsupported data type of {x.dtype} for covariate '{name}'"
                  )
  
      return data_dict
  
file_path: bambi/bambi/interpret/create_data.py
imports: import itertools
  from typing import Union
  from statistics import mode
  import numpy
  import pandas
  from pandas.api.types import is_categorical_dtype, is_float_dtype, is_integer_dtype, is_numeric_dtype, is_object_dtype, is_string_dtype
  from bambi import Model
  from bambi.interpret.utils import ConditionalInfo, enforce_dtypes, get_model_covariates, VariableInfo
  from bambi.interpret.logs import log_interpret_defaults
label_desc: Use image node_id 6 for calling a global function with example usage: set_default_values(model, data_dict) and returns: data_dict