code: def num_symbolic(val):
      """
      Return the number of symbols in val
      """
      if is_symbolic(val):
          return 1
      elif isinstance(val, np.ndarray) and np.issctype(val.dtype):
          return 0
      elif hasattr(val, "__iter__"):
          return sum(any_symbolic(i) for i in val)
      return 0
  
file_path: coremltools/coremltools/converters/mil/mil/types/symbolic.py
imports: import numpy
  import sympy
label_desc: Use image node_id 4 for calling a global function with example usage: num_symbolic(val) and returns: int, int, int, sum