code: def _create_model(
      input_features: np.ndarray,
      target: np.ndarray,
      model: Union[str, Callable[[], PredictionModel]],
  ) -> PredictionModel:
      if not isinstance(model, AssignmentQuality):
          return model()
      else:
          return select_model(input_features, target, model)[0]
  
file_path: dowhy/dowhy/gcm/independence_test/generalised_cov_measure.py
imports: from typing import Callable, Optional, Union
  import numpy
  from scipy import stats
  from dowhy.gcm.auto import AssignmentQuality, select_model
  from dowhy.gcm.ml import PredictionModel
  from dowhy.gcm.util.general import is_categorical, shape_into_2d
label_desc: Use image node_id 2 for calling a global function with example usage: _create_model(input_features, target, model) and returns: model, select_model