code: def from_json(cls, json):
      
      mapreduce_spec = cls(json["name"],
                           json["mapreduce_id"],
                           json["mapper_spec"],
                           json.get("params"),
                           json.get("hooks_class_name"))
      return mapreduce_spec
docs: Create new MapreduceSpec from the json, encoded by to_json.
  
      Args:
        json: json representation of MapreduceSpec.
  
      Returns:
        an instance of MapreduceSpec with all data deserialized from json.