input: def feature_extraction(input_str):
      import json
      data = json.loads(input_str)
  
      features = {
          "id": data["id"],
          "title": data["title"],
          "body_len": len(data["body"])
      }
  
      return features
  
  ### Example:
  >>> feature_extraction('{"id":111,"title":"This is a sample title","body":"This is a sample body text"}')
  {'id': 111, 'title': 'This is a sample title', 'body_len': 27}
output:     features["num_keywords"] = len(data["keywords"])
      features["avg_word_len"] = sum(len(word) for word in data["body"].split()) / len(data["body"].split())
      return features