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
  
  # Test case
  """
  >>> 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': 30}
  """
  
output:     for key, value in data.items():
          if isinstance(value, list):
              features[f"{key}_len"] = len(value)
              features[f"{key}_unique_len"] = len(set(value))
          elif isinstance(value, dict):
              features[f"{key}_keys_len"] = len(value.keys())
              features[f"{key}_values_len"] = len(value.values())
  
      return features