code: def from_java(cls, java_map_info: JavaObject) -> "MapInfo":
      if java_map_info == None:
          return None
      else:
          key_type = java_gateway.get_field(
              java_map_info, "keyType"
          ).toString()
          value_type = java_gateway.get_field(
              java_map_info, "valueType"
          ).toString()
          size = java_gateway.get_field(java_map_info, "size")
          return cls(key_type, value_type, size)
  
imports: from abc import ABCMeta
  import sys
  from typing import Mapping, List
  from py4j import java_gateway
  from synapse.ml.onnx._ONNXModel import _ONNXModel
  from pyspark.ml.common import inherit_doc
  from py4j.java_gateway import JavaObject
label_desc: Use image node_id 4 for calling the MapInfo obj's underlying member method code with example usage: obj.from_java(cls, java_map_info) and returns: None, cls