def METHOD_NAME(values):
  """Pack protobuf values."""
  packed = {}
  if values is None:
    return packed
  for key, value in values.items():
    packed_value = Any()
    if isinstance(value, float):
      packed_value.Pack(wrappers_pb2.DoubleValue(value=value))
    elif isinstance(value, int):
      packed_value.Pack(wrappers_pb2.Int64Value(value=value))
    elif isinstance(value, str):
      packed_value.Pack(wrappers_pb2.StringValue(value=value))
    else:
      raise ValueError('Unknown stat type for ' + key)
    packed[key] = packed_value
  return packed