}
private static class PythonToJava implements Function<Object, Metric> {
@Override
public Metric apply(Object pyObject) {
PyTuple pyTuple = (PyTuple) pyObject;
Metric metric = new Metric();
metric.setName(pyTuple.get(0).toString());
PyTuple data = ((PyTuple) pyTuple.get(1));
metric.setTimestamp(new Date(((Number) data.get(0)).longValue() * 1000));
metric.setValue(new BigDecimal(((Number) data.get(1)).doubleValue()));
return metric;
}