code: def get_features_from_data_source(writer, data_source):
      """Generates a dict of features from data source object
  
      Args:
        writer: ATDSWriter object
        data_source: DataSource object
      """
      scenario = data_source.scenario
      features = {
          feature_name: writer._get_atds_feature(scenario[feature_name])
          for feature_name in scenario
      }
      return features
  
file_path: io/tests/test_atds_avro/utils/atds_benchmark_utils.py
imports: import avro.schema
  import glob
  import json
  import os
  import tensorflow
  from tests.test_atds_avro.utils.data_source import DataSource
  from tests.test_atds_avro.utils.data_source_registry import SMALL_NUM_RECORDS, get_canonical_name, get_data_source_from_registry
  from tests.test_atds_avro.utils.generator.tensor_generator import IntTensorGenerator, FloatTensorGenerator, WordTensorGenerator, BoolTensorGenerator
  from tests.test_atds_avro.utils.generator.sparse_tensor_generator import IntSparseTensorGenerator, FloatSparseTensorGenerator, WordSparseTensorGenerator, BoolSparseTensorGenerator, get_common_value_dist
  from tests.test_atds_avro.utils.generator.varlen_tensor_generator import IntVarLenTensorGenerator, FloatVarLenTensorGenerator, WordVarLenTensorGenerator, BoolVarLenTensorGenerator
  from tensorflow_io.python.experimental.atds.dataset import ATDSDataset
  from tests.test_atds_avro.utils.atds_writer import ATDSWriter
  from tests.test_atds_avro.utils.benchmark_utils import benchmark_func
label_desc: Use image node_id 1 for calling a global function with example usage: get_features_from_data_source(writer, data_source) and returns: features