def _set_pb_meaning_from_entity(entity, name, value, value_pb, is_list=False):
 if (name not in entity._meanings):
  return
 (meaning, orig_value) = entity._meanings[name]
 if (orig_value is not value):
  return
 if is_list:
  if (not isinstance(meaning, list)):
   meaning = itertools.repeat(meaning)
  val_iter = six.moves.zip(value_pb.array_value.values, meaning)
  for (sub_value_pb, sub_meaning) in val_iter:
   if (sub_meaning is not None):
    sub_value_pb.meaning = sub_meaning
 else:
  value_pb.meaning = meaning

def _set_pb_meaning_from_entity ( entity , name , value , value_pb , is_list = False ) : if ( name not in entity . _meanings ) : return ( meaning , orig_value ) = entity . _meanings [ name ] if ( orig_value is not value ) : return if is_list : if ( not isinstance ( meaning , list ) ) : meaning = itertools . repeat ( meaning ) val_iter = six . moves . zip ( value_pb . array_value . values , meaning ) for ( sub_value_pb , sub_meaning ) in val_iter : if ( sub_meaning is not None ) : sub_value_pb . meaning = sub_meaning else : value_pb . meaning = meaning
add meaning information to a protobuf .