code: def dimension_of_array_features(features):
      if not is_valid_feature_list(features):
          raise ValueError("Expected feature list in valid form.")
  
      dim = 0
      for n, td in features:
          if isinstance(td, (datatypes.Int64, datatypes.Double)):
              dim += 1
          elif isinstance(td, datatypes.Array):
              dim += reduce(op.mul, td.dimensions, 1)
          else:
              raise ValueError(
                  "Unable to determine number of dimensions from feature list."
              )
  
      return dim
  
file_path: coremltools/coremltools/models/_feature_management.py
imports: import operator
  from collections import defaultdict
  from copy import copy
  from functools import reduce
  import numpy
  from .None import datatypes
label_desc: Use image node_id 3 for calling a global function with example usage: dimension_of_array_features(features) and returns: dim