code: def get_spec(allow_tuple=True, allow_list=True):
      """
      :param allow_tuple: boolean, if the model accepts a tuple as input. Default: True
      :param allow_list: boolean, if the model accepts a list as input. Default: True
      :return:
      """
  
      def _get_spec(data):
          data = check_type_and_convert(data, allow_tuple, allow_list)
          feature_spec = [
              (feat.dtype, feat.shape[1:]) for feat in data["x"]
          ]
          if "y" in data:
              label_spec = [
                  (label.dtype, label.shape[1:]) for label in data["y"]
              ]
          else:
              label_spec = None
          return feature_spec, label_spec
  
      return _get_spec
  
imports: import os
  import numpy
  from zoo.common import get_file_list
  from zoo.util.utils import convert_row_to_numpy
label_desc: Use image node_id 4 for calling a global function with example usage: get_spec(allow_tuple, allow_list) and returns: _get_spec, feature_spec,  label_spec