code: def _get_data_spec(
      filters, start, length, row_type, mat_type, sframe, evaluation
  ):
      data_spec = None
      sf = sframe
      if row_type == "all":
          table_data = _filter_sframe(
              filters, "table", mat_type, sf, evaluation
          )
          table_data_sliced = _reform_sframe(
              table_data[(table_data["__idx"] >= start)].head(length)
          )
  
          corrects = _filter_sframe(
              filters, "corrects", mat_type, sf, evaluation
          )
          corrects_sliced = _reform_sframe(
              corrects[(corrects["__idx"] >= start)].head(length)
          )
  
          incorrects = _filter_sframe(
              filters, "incorrects", mat_type, sf, evaluation
          )
          incorrects_sliced = _reform_sframe(
              incorrects[(incorrects["__idx"] >= start)].head(length)
          )
  
          data_spec = {
              "data_spec": {
                  "table": {
                      "data": {"values": table_data_sliced},
                      "size": table_data.num_rows(),
                  },
                  "gallery": {
                      "corrects": {
                          "data": corrects_sliced,
                          "size": corrects.num_rows(),
                      },
                      "incorrects": {
                          "data": incorrects_sliced,
                          "size": incorrects.num_rows(),
                      },
                  },
              }
          }
      else:
          sf = _filter_sframe(
              filters, row_type, mat_type, sf, evaluation
          )
          list_test_data = _reform_sframe(
              sf[(sf["__idx"] >= start)].head(length)
          )
          if row_type == "table":
              data_spec = {
                  "data_spec": {
                      "table": {
                          "data": {"values": list_test_data},
                          "size": sf.num_rows(),
                      }
                  }
              }
          elif row_type == "corrects":
              data_spec = {
                  "data_spec": {
                      "gallery": {
                          "corrects": {
                              "data": list_test_data,
                              "size": sf.num_rows(),
                          }
                      }
                  }
              }
          elif row_type == "incorrects":
              data_spec = {
                  "data_spec": {
                      "gallery": {
                          "incorrects": {
                              "data": list_test_data,
                              "size": sf.num_rows(),
                          }
                      }
                  }
              }
  
      return _json.dumps(data_spec) + "\n"
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from ...visualization import _get_client_app_path
  import turicreate
  import subprocess
  import six
  from six.moves import _thread
  import json
  import base64
  import math
label_desc: Use image node_id 1 for calling a global function with example usage: _get_data_spec(filters, start, length, row_type, mat_type, sframe, evaluation) and returns: unknown