code: def validate_num_inputs(inputs, num):
      inputs = nest.flatten(inputs)
      if not len(inputs) == num:
          raise ValueError(
              "Expected {num} elements in the inputs list "
              "but received {len} inputs.".format(
                  num=num, len=len(inputs)
              )
          )
  
file_path: autokeras/autokeras/utils/utils.py
imports: import re
  import warnings
  import keras_tuner
  import tensorflow
  from packaging.version import parse
  from tensorflow import nest
label_desc: Use image node_id 1 for calling a global function with example usage: validate_num_inputs(inputs, num) without return types