input: Write a function to extract specific features from a JSON string representing a document. The function should load the JSON string, extract the 'id', 'title', and the length of the 'body' text, and return these features in a dictionary format.
  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
  
  assert 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: 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