code: def test_data_from_json():
      # several features
      files_path = os.path.join("test", "data", "multi_modal")
      path = os.path.join(str(fedot_project_root()), files_path)
      data = InputData.from_json_files(
          path,
          fields_to_use=["votes", "year"],
          label="rating",
          task=Task(TaskTypesEnum.regression),
      )
      assert data.features.shape[1] == 2  # check there is two features
      assert len(data.target) == data.features.shape[0] == len(data.idx)
  
      # single feature
      data = InputData.from_json_files(
          path,
          fields_to_use=["votes"],
          label="rating",
          task=Task(TaskTypesEnum.regression),
      )
      assert len(data.features.shape) == 1  # check there is one feature
      assert len(data.target) == len(data.features) == len(data.idx)
  
imports: import os
  from copy import deepcopy, copy
  import numpy
  import pandas
  import pytest
  from sklearn.datasets import load_iris
  from fedot.core.data.data import InputData, get_df_from_csv
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum
  from fedot.core.utils import fedot_project_root
  from test.unit.tasks.test_forecasting import get_ts_data_with_dt_idx
label_desc: Use image node_id 6 for calling a global function with example usage: test_data_from_json() without return types