code: def timeseries_generator_from_json(json_string):
      """Parses a JSON timeseries generator configuration file and
      returns a timeseries generator instance.
  
      # Arguments
          json_string: JSON string encoding a timeseries
              generator configuration.
  
      # Returns
          A Keras TimeseriesGenerator instance
      """
      full_config = json.loads(json_string)
      config = full_config.get("config")
  
      data = json.loads(config.pop("data"))
      config["data"] = data
      targets = json.loads(config.pop("targets"))
      config["targets"] = targets
  
      return TimeseriesGenerator(**config)
  
file_path: keras-preprocessing/keras_preprocessing/sequence.py
imports: import json
  import random
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: timeseries_generator_from_json(json_string) and returns: TimeseriesGenerator