code: def _validate_feature_costs(feature_costs, n_features):
      if feature_costs is None:
          feature_costs = np.ones(n_features, dtype=np.float64)
      else:
          assert (
              len(feature_costs) == n_features
          ), f"{len(feature_costs)} != {n_features}"
          np.min(feature_costs) >= 0
      return feature_costs
  
file_path: imodels/imodels/util/tree.py
imports: from sklearn import datasets
  from sklearn.tree import DecisionTreeRegressor
  import numpy
  from sklearn.tree._tree import Tree
  from imodels.tree.custom_greedy_tree import CustomDecisionTreeClassifier
label_desc: Use image node_id 2 for calling a global function with example usage: _validate_feature_costs(feature_costs, n_features) and returns: feature_costs