code: def _infer_min_num_features(model):
      # find the largest index of all the support vectors
      max_index = 0
      for i in range(model.l):
          j = 0
          while model.SV[i][j].index != -1:
              cur_last_index = model.SV[i][j].index
              j += 1
          if cur_last_index > max_index:
              max_index = cur_last_index
      return max_index
  
imports: from ...None import SPECIFICATION_VERSION
  from ..._deps import _HAS_LIBSVM
  from coremltools import __version__
  from coremltools.models import _METADATA_VERSION, _METADATA_SOURCE
  from six import string_types
label_desc: Use image node_id 1 for calling a global function with example usage: _infer_min_num_features(model) and returns: max_index