def make_summary(serialized_data):
    """
    Take in a full serialized object, and return dict containing just
    the id and the name

    Parameter: serialized_data, dict, or list of dicts
    Returns: dict, or list of dicts, containing just "name" and "id" key/values.
    """

    def summarize_one(data):
        if not (
            isinstance(data, dict) and "id" in data.keys() and "name" in data.keys()
        ):
            raise RuntimeError("Expected dictionary containing name and id")
        return {"name": data["name"], "id": data["id"]}

    if isinstance(serialized_data, list):
        return [summarize_one(sd) for sd in serialized_data]
    else:
        return summarize_one(serialized_data)