code: def update_dimension(model, input_dimension):
      
      if not(_HAS_SKLEARN):
          raise RuntimeError('scikit-learn not found. scikit-learn conversion API is disabled.')
  
      _sklearn_util.check_fitted(model, lambda m: hasattr(m, 'active_features_'))
      _sklearn_util.check_fitted(model, lambda m: hasattr(m, 'n_values_'))
  
      if model.categorical_features == 'all':
          return len(model.active_features_)
      else:
          out_dimension = (len(model.active_features_)
                           + (input_dimension - len(model.n_values_)))
  
      return out_dimension
docs: Given a model that takes an array of dimension input_dimension, returns
      the output dimension.