code: def update(
      json_dict: Optional[Dict[Text, Any]] = None
  ) -> Dict[Text, Any]:
      """Updates a Model Card JSON dictionary to the latest schema version.
  
      If you have a JSON string, you can use it with this function as follows:
  
      ```python
      json_dict = json.loads(json_text)
      updated_json_dict = json_util.update(json_dict)
      ```
  
      Args:
        json_dict: A dictionary representing a Model Card JSON object.
  
      Returns:
        The input Model Card, converted to a JSON string of the latest schema
          version. If the input Model Card already corresponds to schema v0.0.2, it
          is returned unmodified.
  
      Raises:
        ValidationError: If `json_dict` does not follow the model card JSON v0.0.1
          schema.
      """
      try:
          validate_json_schema(json_dict, "0.0.2")
          logging.info("JSON object already matches schema 0.0.2.")
          return json_dict  # pytype: disable=bad-return-type
      except jsonschema.ValidationError:
          logging.info("JSON object does match schema 0.0.2; updating.")
          return _update_from_v1_to_v2(json_dict)
  
file_path: model-card-toolkit/model_card_toolkit/utils/json_utils.py
imports: import json
  import logging
  import os
  import pkgutil
  from typing import Any, Dict, Optional, Text
  import jsonschema
label_desc: Use image node_id 4 for calling a global function with example usage: update(json_dict) and returns: json_dict, _update_from_v1_to_v2