class_docstr: Model card field base class.
  
  This is an abstract class. All the model card fields should inherit this class
  and override the _proto_type property to the corresponding proto type. This
  abstract class provides methods `from_proto`, `merge_from_proto` and
  `to_proto` to convert the class from and to proto. The child class does not
  need to override this unless it needs some special process.
docstr: Parses a JSON dictionary into the current object.
docstr_tok: ["Parses","a","JSON","dictionary","into","the","current","object","."]
code: def _from_json(self: T, json_dict: Dict[str, Any], field: T) -> T:
      """Parses a JSON dictionary into the current object."""
      for subfield_key, subfield_json_value in json_dict.items():
          if subfield_key.startswith(json_utils.SCHEMA_VERSION_STRING):
              continue
          elif not hasattr(field, subfield_key):
              raise ValueError(
                  'BaseModelCardField %s has no such field named "%s".'
                  % (field, subfield_key)
              )
          elif isinstance(subfield_json_value, dict):
              subfield_value = self._from_json(
                  subfield_json_value, getattr(field, subfield_key)
              )
          elif isinstance(subfield_json_value, list):
              subfield_value = []
              for item in subfield_json_value:
                  if isinstance(item, dict):
                      new_object = field.__annotations__[
                          subfield_key
                      ].__args__[
                          0
                      ]()  # pytype: disable=attribute-error
                      subfield_value.append(
                          self._from_json(item, new_object)
                      )
                  else:  # if primitive
                      subfield_value.append(item)
          else:
              subfield_value = subfield_json_value
          setattr(field, subfield_key, subfield_value)
      return field
  
imports: import abc
  import dataclasses
  import json
  from textwrap import dedent
  from typing import Any, Dict, Type, TypeVar
  from warnings import warn
  from google.protobuf import descriptor, message
  from model_card_toolkit.utils import json_utils
label_desc: Use image node_id 8 for calling the BaseModelCardField obj's underlying member method code with example usage: obj._from_json(json_dict, field) and returns: field