code: def convert_pb_kvs(kvs, include_non_primitives=True):
    
    config = {}
    for kv in kvs:
      if kv.value:
        config[kv.key] = kv.value
      elif kv.serialized_value:
        # add serialized_value support for python values (fixme)
  
        # is this a serialized java object
        if topology_pb2.JAVA_SERIALIZED_VALUE == kv.type:
          jv = _convert_java_value(kv, include_non_primitives=include_non_primitives)
          if jv is not None:
            config[kv.key] = jv
        else:
          config[kv.key] = _raw_value(kv)
    return config
docs: converts pb kvs to dict