code: def get_input_dimension(model):
      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.feature_indices_) - 1
      else:
          # This can't actually be determined from the model as indices after the
          # rest of the categorical values don't seem to be tracked
          return None
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/sklearn/_one_hot_encoder.py
imports: from .None import _sklearn_util
  from ...None import SPECIFICATION_VERSION
  from ...models._interface_management import set_transform_interface_params
  from ...proto import Model_pb2
  from ...proto import FeatureTypes_pb2
  from ...proto import OneHotEncoder_pb2
  from ...models import datatypes
  from ...models import MLModel
  from ...models.feature_vectorizer import create_feature_vectorizer
  from ...models.array_feature_extractor import create_array_feature_extractor
  from ...models.pipeline import Pipeline
  from ..._deps import _HAS_SKLEARN
label_desc: Use image node_id 3 for calling a global function with example usage: get_input_dimension(model) and returns: unknown, None